Skip to content

Commit

Permalink
script/build.sh: build static binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
  • Loading branch information
unclejack authored and chrisplo committed Nov 29, 2017
1 parent a891233 commit e44ca0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ set -euxo pipefail
GIT_COMMIT=$(./scripts/getGitCommit.sh)

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

0 comments on commit e44ca0b

Please sign in to comment.