build: set build version in binary at build time
This commit is contained in:
parent
1d3f16e6c6
commit
761d0bfad5
2
build.sh
2
build.sh
@ -88,7 +88,7 @@ single_build() {
|
|||||||
# GOARCH/GOOS supplied in function env
|
# GOARCH/GOOS supplied in function env
|
||||||
go build \
|
go build \
|
||||||
-a \
|
-a \
|
||||||
-ldflags '-s -w' \
|
-ldflags "-s -w -X main.VERSION=nmdc-webfrontend/${version}" \
|
||||||
-gcflags "-trimpath=${GOPATH}" \
|
-gcflags "-trimpath=${GOPATH}" \
|
||||||
-asmflags "-trimpath=${GOPATH}" \
|
-asmflags "-trimpath=${GOPATH}" \
|
||||||
-o "$(pathfix "${tmpdir}/${local_bin_name}")"
|
-o "$(pathfix "${tmpdir}/${local_bin_name}")"
|
||||||
|
Loading…
Reference in New Issue
Block a user