Skip to content

Commit 4df26a0

Browse files
committed
Fix version not being set properly during build.
Closes #170. This release will be backported and 0.4.4 re-released.
1 parent c82c0eb commit 4df26a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

magefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func makeBuilder(cmd string, platform Platform) func() error {
627627

628628
fmt.Println("Building", platform.PlatformBin(cmd))
629629
return sh.RunWith(map[string]string{"CGO_ENABLED": "0", "GOOS": platform.OS, "GOARCH": platform.Arch},
630-
"go", "build", "-a", "-ldflags", fmt.Sprintf("-extldflags '-static' -X version.Version=%s", version),
630+
"go", "build", "-a", "-ldflags", fmt.Sprintf("-extldflags '-static' -X main.Version=%s", version),
631631
"-o", platform.PlatformBin(cmd), cmdSrc)
632632
}
633633
return f

0 commit comments

Comments
 (0)