releaser: Work around a Goreleaser bug
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Aug 2018 08:58:18 +0000 (10:58 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 17 Aug 2018 09:03:28 +0000 (11:03 +0200)
Closes #4918

releaser/releaser.go

index 02a98fa9f713fed54a3962f0dacac91a4652721d..a41608ed7bfb6f651e9b6fb4f6fb3874a943293a 100644 (file)
@@ -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()