Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
fix: format overrides and multiple archives
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Apr 30, 2019
1 parent 73a5763 commit df84f0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shell_godownloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ func processGodownloader(repo, path, filename string) ([]byte, error) {
if err != nil {
return nil, fmt.Errorf("unable to parse: %s", err)
}
// hacky way for when the project has multiple archives.
// for now this only handles the first archive.
// TODO: support this once multiple archives is done on goreleaser side.
if len(cfg.Archives) > 0 {
cfg.Archive = cfg.Archives[0]
}
// get archive name template
archName, err := makeName("NAME=", cfg.Archive.NameTemplate)
cfg.Archive.NameTemplate = archName
Expand Down Expand Up @@ -146,9 +152,9 @@ adjust_format() {
case ${OS} in
{{- range . }}
{{ .Goos }}) FORMAT={{ .Format }} ;;
{{- end }}
esac
{{- end }}
{{- end }}
true
}
adjust_os() {
Expand Down

0 comments on commit df84f0a

Please sign in to comment.