Browse Source

release: Add multi arch support

Signed-off-by: Geoff Levand <geoff@infradead.org>
Geoff Levand 8 years ago
parent
commit
07c07cea25
1 changed files with 11 additions and 5 deletions
  1. 11 5
      scripts/release.sh

+ 11 - 5
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