diff --git a/.gitignore b/.gitignore index 2a86e41caf..6f6cfa1682 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ docs/AWS_S3_BUCKET docs/GIT_BRANCH docs/VERSION docs/GITCOMMIT +dockerversion/static.go diff --git a/hack/make.sh b/hack/make.sh index d6da3057fa..5d0ddd879f 100755 --- a/hack/make.sh +++ b/hack/make.sh @@ -94,6 +94,8 @@ if [ -z "$DOCKER_CLIENTONLY" ]; then DOCKER_BUILDTAGS+=" daemon" fi +rm -f dockerversion/static.go + # Use these flags when compiling the tests and final binary LDFLAGS=' -w @@ -115,7 +117,6 @@ TESTFLAGS+=" -test.timeout=${TIMEOUT}" EXTLDFLAGS_STATIC_DOCKER="$EXTLDFLAGS_STATIC -lpthread -Wl,--unresolved-symbols=ignore-in-object-files" LDFLAGS_STATIC_DOCKER=" $LDFLAGS_STATIC - -X $DOCKER_PKG/dockerversion.IAMSTATIC true -extldflags \"$EXTLDFLAGS_STATIC_DOCKER\" " diff --git a/hack/make/binary b/hack/make/binary index b97069a856..2c71f201b9 100755 --- a/hack/make/binary +++ b/hack/make/binary @@ -3,6 +3,17 @@ set -e DEST=$1 +: ${IAMSTATIC:=true} + +cat > dockerversion/static.go < dockerversion/static.go <