build/release: link all release binaries statically

This commit is contained in:
Stefan Junker
2016-04-28 22:40:59 +02:00
parent 5ab94d6e50
commit a721ce6bbf
3 changed files with 6 additions and 38 deletions

View File

@ -7,6 +7,7 @@ FEDORA_INSTALL="dnf install -y golang tar xz bzip2 gzip sudo iproute wget"
FEDORA_IMAGE="docker://fedora:23"
ACBUILD_URL="https://github.com/appc/acbuild/releases/download/v0.2.2/acbuild.tar.gz"
ACBUILD="acbuild --debug"
BUILDFLAGS="-a --ldflags '-extldflags \"-static\"'"
TAG=$(git describe --exact-match --abbrev=0) || TAG=$(git describe)
RELEASE_DIR=release-${TAG}
@ -25,7 +26,7 @@ sudo -E rkt run \
${FEDORA_IMAGE} \
--exec /bin/bash \
-- -xe -c "\
${FEDORA_INSTALL}; cd /opt/src; umask 0022; ./build-static; ./test || true; \
${FEDORA_INSTALL}; cd /opt/src; umask 0022; CGO_ENABLED=0 ./build ${BUILDFLAGS}; ./test || true; \
for format in txz tbz2 tgz; do \
FILENAME=cni-${TAG}.\$format; \
FILEPATH=${RELEASE_DIR}/\$FILENAME; \