You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
feat: also support minio
This commit is contained in:
committed by
Carlos Alexandro Becker
parent
1c426847d9
commit
17f09de1e8
@@ -81,4 +81,5 @@ snapcraft:
|
|||||||
confinement: classic
|
confinement: classic
|
||||||
s3:
|
s3:
|
||||||
- bucket: goreleaser
|
- bucket: goreleaser
|
||||||
|
endpoint: http://localhost:9000
|
||||||
|
|
||||||
|
@@ -246,9 +246,10 @@ type Before struct {
|
|||||||
|
|
||||||
// S3 contains s3 config
|
// S3 contains s3 config
|
||||||
type S3 struct {
|
type S3 struct {
|
||||||
Region string
|
Region string
|
||||||
Bucket string
|
Bucket string
|
||||||
Folder string
|
Folder string
|
||||||
|
Endpoint string // used for minio for example
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project includes all project configuration
|
// Project includes all project configuration
|
||||||
|
@@ -56,7 +56,12 @@ func (Pipe) Run(ctx *context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func upload(ctx *context.Context, conf config.S3) error {
|
func upload(ctx *context.Context, conf config.S3) error {
|
||||||
sess := session.Must(session.NewSession())
|
var awsConfig = aws.Config{}
|
||||||
|
if conf.Endpoint != "" {
|
||||||
|
awsConfig.Endpoint = aws.String(conf.Endpoint)
|
||||||
|
awsConfig.S3ForcePathStyle = aws.Bool(true)
|
||||||
|
}
|
||||||
|
sess := session.Must(session.NewSession(&awsConfig))
|
||||||
svc := s3.New(sess, &aws.Config{
|
svc := s3.New(sess, &aws.Config{
|
||||||
Region: aws.String(conf.Region),
|
Region: aws.String(conf.Region),
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user