Skip to content

Commit

Permalink
Fix version not being set properly during build.
Browse files Browse the repository at this point in the history
Closes #170.

This release will be backported and 0.4.4 re-released.
  • Loading branch information
wrouesnel committed Mar 20, 2018
1 parent c82c0eb commit 4df26a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4df26a0

Please sign in to comment.