Skip to content

Commit

Permalink
Merge pull request #245 from estesp/update-version-in-crossbuilds
Browse files Browse the repository at this point in the history
Update cross-compilation script to set version
  • Loading branch information
estesp authored Dec 5, 2023
2 parents 1713717 + b4d7e43 commit d5a85e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hack/cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ COMMIT="$(git rev-parse HEAD 2>/dev/null)"
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
COMMIT="${COMMIT}-dirty"
fi
VERSION="$(git describe --tags --always | cut -c 2-)"

LDFLAGS="-w -extldflags -static -X main.gitCommit=${COMMIT}"
LDFLAGS_OTHER="-X main.gitCommit=${COMMIT}"
LDFLAGS="-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION}"
LDFLAGS_OTHER="-X main.gitCommit=${COMMIT} -X main.version=${VERSION}"

# List of platforms we build binaries for at this time:
PLATFORMS=(
Expand Down

0 comments on commit d5a85e1

Please sign in to comment.