You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-06-23 00:40:06 +02:00
fix: blob provider authentication issues for default aws mechanism (#1061)
* fix: blob provider authentication issues for default aws mechanism * remove commented code * docs: update the authentication doc * fix: linter issues
This commit is contained in:
committed by
Carlos Alexandro Becker
parent
ef6e13a61b
commit
ce5ade64c1
@ -3,6 +3,7 @@ package blob
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/goreleaser/goreleaser/internal/pipe"
|
||||
"github.com/goreleaser/goreleaser/internal/semerrgroup"
|
||||
@ -34,13 +35,6 @@ func (Pipe) Default(ctx *context.Context) error {
|
||||
if blob.Folder == "" {
|
||||
blob.Folder = "{{ .ProjectName }}/{{ .Tag }}"
|
||||
}
|
||||
// Validation before opening connection to bucket
|
||||
// gocdk also does this validation but doing it in advance for better error handling
|
||||
// as currently, go cdk does not throw error if AZURE_STORAGE_KEY is missing.
|
||||
err := checkProvider(blob.Provider)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -66,3 +60,13 @@ func (Pipe) Publish(ctx *context.Context) error {
|
||||
}
|
||||
return g.Wait()
|
||||
}
|
||||
|
||||
// errorContains check if error contains specific string
|
||||
func errorContains(err error, subs ...string) bool {
|
||||
for _, sub := range subs {
|
||||
if strings.Contains(err.Error(), sub) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user