Skip to content

Commit e44ca0b

Browse files
unclejackchrisplo
authored andcommitted
script/build.sh: build static binaries
Signed-off-by: Cristian Staretu <[email protected]>
1 parent a891233 commit e44ca0b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/build.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ set -euxo pipefail
55
GIT_COMMIT=$(./scripts/getGitCommit.sh)
66

77
PKG_NAME=github.com/contiv/netplugin/version
8-
GOGC=1500 go install -v \
8+
GOGC=1500 CGO_ENABLED=0 go install -v \
9+
-a -installsuffix cgo \
910
-ldflags "-X $PKG_NAME.version=$BUILD_VERSION \
1011
-X $PKG_NAME.buildTime=$(date -u +%m-%d-%Y.%H-%M-%S.UTC) \
1112
-X $PKG_NAME.gitCommit=$GIT_COMMIT \
12-
-s -w" \
13+
-s -w -d" -pkgdir /tmp/foo-cgo \
1314
$TO_BUILD

0 commit comments

Comments
 (0)