From 4df26a0922a554e466599ce560139fe234b9109c Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Wed, 21 Mar 2018 00:27:00 +1100 Subject: [PATCH] Fix version not being set properly during build. Closes #170. This release will be backported and 0.4.4 re-released. --- magefile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magefile.go b/magefile.go index 92a1bd69..73d383f9 100644 --- a/magefile.go +++ b/magefile.go @@ -627,7 +627,7 @@ func makeBuilder(cmd string, platform Platform) func() error { fmt.Println("Building", platform.PlatformBin(cmd)) return sh.RunWith(map[string]string{"CGO_ENABLED": "0", "GOOS": platform.OS, "GOARCH": platform.Arch}, - "go", "build", "-a", "-ldflags", fmt.Sprintf("-extldflags '-static' -X version.Version=%s", version), + "go", "build", "-a", "-ldflags", fmt.Sprintf("-extldflags '-static' -X main.Version=%s", version), "-o", platform.PlatformBin(cmd), cmdSrc) } return f