Use code generation to set IAMSTATIC instead of -X

Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
This commit is contained in:
Michael Hudson-Doyle
2014-10-24 10:56:51 +13:00
parent 6ce4f82ebe
commit 3e10b93106
4 changed files with 23 additions and 1 deletions
+11
View File
@@ -3,6 +3,17 @@ set -e
DEST=$1
: ${IAMSTATIC:=true}
cat > dockerversion/static.go <<EOF
// AUTOGENERATED FILE; see hack/make/binary and hack/make/dynbinary
package dockerversion
func init() {
IAMSTATIC = $IAMSTATIC
}
EOF
go build \
-o "$DEST/docker-$VERSION" \
"${BUILDFLAGS[@]}" \