Split build.sh into two OS-specific scripts

This commit is contained in:
Ben Moss
2018-11-01 16:14:18 -04:00
parent 2d03820ebb
commit 4e1f7802db
7 changed files with 73 additions and 53 deletions

View File

@ -19,15 +19,26 @@ docker run -v ${SRC_DIR}:/go/src/github.com/containernetworking/plugins --rm gol
/bin/sh -xe -c "\
apk --no-cache add bash tar;
cd /go/src/github.com/containernetworking/plugins; umask 0022;
for arch in amd64 arm arm64 ppc64le s390x; do \
rm -f ${OUTPUT_DIR}/*; \
CGO_ENABLED=0 GOARCH=\$arch ./build.sh ${BUILDFLAGS}; \
CGO_ENABLED=0 GOARCH=\$arch ./build_linux.sh ${BUILDFLAGS}; \
for format in tgz; do \
FILENAME=cni-plugins-\$arch-${TAG}.\$format; \
FILENAME=cni-plugins-linux-\$arch-${TAG}.\$format; \
FILEPATH=${RELEASE_DIR}/\$FILENAME; \
tar -C ${OUTPUT_DIR} --owner=0 --group=0 -caf \$FILEPATH .; \
done; \
done;
rm -rf ${OUTPUT_DIR}/*; \
CGO_ENABLED=0 GOARCH=amd64 ./build_windows.sh ${BUILDFLAGS}; \
for format in tgz; do \
FILENAME=cni-plugins-windows-amd64-${TAG}.\$format; \
FILEPATH=${RELEASE_DIR}/\$FILENAME; \
tar -C ${OUTPUT_DIR} --owner=0 --group=0 -caf \$FILEPATH .; \
done;
cd ${RELEASE_DIR};
for f in *.tgz; do sha1sum \$f > \$f.sha1; done;
for f in *.tgz; do sha256sum \$f > \$f.sha256; done;