From df84f0a1b6c9c393a8aa6672469f2862f5906b82 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 30 Apr 2019 15:53:41 -0300 Subject: [PATCH] fix: format overrides and multiple archives --- shell_godownloader.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell_godownloader.go b/shell_godownloader.go index 7a4e054..5e91559 100644 --- a/shell_godownloader.go +++ b/shell_godownloader.go @@ -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 @@ -146,9 +152,9 @@ adjust_format() { case ${OS} in {{- range . }} {{ .Goos }}) FORMAT={{ .Format }} ;; + {{- end }} esac {{- end }} - {{- end }} true } adjust_os() {