From 347492f54d6361dc98d4b022ea42bf67a36a0b64 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 12 Apr 2017 11:11:02 -0700 Subject: [PATCH] release: Add multi arch support Signed-off-by: Geoff Levand --- scripts/release.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 67b6661ea266..d6c6edbf9479 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -5,7 +5,6 @@ # set -e -ARCH=$(go env GOARCH) VERSION=$1 if [ -z "${VERSION}" ]; then echo "Usage: ${0} VERSION" >> /dev/stderr @@ -27,8 +26,15 @@ ETCD_ROOT=$(dirname "${BASH_SOURCE}")/.. pushd ${ETCD_ROOT} >/dev/null echo Building etcd binary... ./scripts/build-binary ${VERSION} - echo Building aci image... - BINARYDIR=release/etcd-${VERSION}-linux-amd64 BUILDDIR=release ./scripts/build-aci ${VERSION} - echo Building docker image... - BINARYDIR=release/etcd-${VERSION}-linux-${ARCH} BUILDDIR=release ./scripts/build-docker ${VERSION} + + # ppc64le not yet supported by acbuild. + for TARGET_ARCH in "amd64" "arm64"; do + echo Building ${TARGET_ARCH} aci image... + GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-aci ${VERSION} + done + + for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do + echo Building ${TARGET_ARCH} docker image... + GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker ${VERSION} + done popd >/dev/null