Fix mis-versioning due to hardcoding cmd.Version (#1431)

This commit is contained in:
Takumi Sue
2022-11-14 16:38:43 +11:00
committed by GitHub
parent ffc20f7e2c
commit 1fd96e168e
3 changed files with 6 additions and 4 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
#!/bin/bash
set -e
# you may need to go install github.com/mitchellh/gox@v1.0.1 first
CGO_ENABLED=0 gox -ldflags "${LDFLAGS}" -output="build/yq_{{.OS}}_{{.Arch}}" --osarch="darwin/amd64 darwin/arm64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm linux/arm64 linux/mips linux/mips64 linux/mips64le linux/mipsle linux/ppc64 linux/ppc64le linux/s390x netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 windows/386 windows/amd64"
echo $VERSION
CGO_ENABLED=0 gox -ldflags "${LDFLAGS} -X cmd.Version=${VERSION}" -output="build/yq_{{.OS}}_{{.Arch}}" --osarch="darwin/amd64 darwin/arm64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm linux/arm64 linux/mips linux/mips64 linux/mips64le linux/mipsle linux/ppc64 linux/ppc64le linux/s390x netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 windows/386 windows/amd64"
cd build
@@ -21,4 +21,4 @@ rhash -r -a . -o checksums
rhash --list-hashes > checksums_hashes_order
cp ../scripts/extract-checksum.sh .
cp ../scripts/extract-checksum.sh .