Browse Source

Fix gitrev build argument for Go 1.10

On Go 1.10 the -ldflags should only apply to packages explicitly listed in the
packages list of the build command. It is probably a bug that the ldflags option
does not apply when omitting the package name (go build) on Linux.

https://github.com/golang/go/issues/24310
Martin Hebnes Pedersen 1 year ago
parent
commit
64a17b5f59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      make.bash

+ 1 - 1
make.bash

@@ -52,7 +52,7 @@ go test -tags "$TAGS" `go list ./...|grep -v vendor` `go list ./...|grep wl2k-go
 echo
 
 echo "Building Pat v$VERSION..."
-go build -tags "$TAGS" -ldflags "-X \"main.GitRev=$GITREV\""
+go build -tags "$TAGS" -ldflags "-X \"main.GitRev=$GITREV\"" $(go list .)
 
 # Build macOS pkg (amd64)
 if [[ "$OS" == "darwin"* ]] && command -v packagesbuild >/dev/null 2>&1; then