From: Bjørn Erik Pedersen Date: Fri, 17 Aug 2018 08:58:18 +0000 (+0200) Subject: releaser: Work around a Goreleaser bug X-Git-Tag: v0.47~2 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=de23293486bb678fda62c7ca38ed001669d1d227;p=brevno-suite%2Fhugo releaser: Work around a Goreleaser bug Closes #4918 --- diff --git a/releaser/releaser.go b/releaser/releaser.go index 02a98fa9..a41608ed 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -245,7 +245,12 @@ func (r *ReleaseHandler) release(releaseNotesFile string) error { return nil } - cmd := exec.Command("goreleaser", "--rm-dist", "--release-notes", releaseNotesFile, "--skip-publish="+fmt.Sprint(r.skipPublish)) + args := []string{"--rm-dist", "--release-notes", releaseNotesFile} + if r.skipPublish { + args = append(args, "--skip-publish") + } + + cmd := exec.Command("goreleaser", args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run()