From 5d04e28d9ef4d3a2780c0f85cb157fea958fa4fc Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Mon, 3 Oct 2016 15:20:51 -0700 Subject: [PATCH] Remove amd64 assumption in release.sh, cross and tgz scripts Signed-off-by: Kenfe-Mickael Laventure (cherry picked from commit 61335bcb03ac60385bc19b6e1346b34cd168f7de) Signed-off-by: Victor Vieux --- hack/make/cross | 7 ++++--- hack/make/tgz | 3 ++- hack/release.sh | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hack/make/cross b/hack/make/cross index a96bfd2c20..a9118393f5 100644 --- a/hack/make/cross +++ b/hack/make/cross @@ -10,13 +10,14 @@ daemonSupporting=( # if we have our linux/amd64 version compiled, let's symlink it in if [ -x "$DEST/../binary-daemon/dockerd-$VERSION" ]; then - mkdir -p "$DEST/linux/amd64" + arch=$(go env GOHOSTARCH) + mkdir -p "$DEST/linux/${arch}" ( - cd "$DEST/linux/amd64" + cd "$DEST/linux/${arch}" ln -s ../../../binary-daemon/* ./ ln -s ../../../binary-client/* ./ ) - echo "Created symlinks:" "$DEST/linux/amd64/"* + echo "Created symlinks:" "$DEST/linux/${arch}/"* fi for platform in $DOCKER_CROSSPLATFORMS; do diff --git a/hack/make/tgz b/hack/make/tgz index b1abfef92f..0c1a4d5429 100644 --- a/hack/make/tgz +++ b/hack/make/tgz @@ -4,7 +4,8 @@ CROSS="$DEST/../cross" set -e -if [ ! -d "$CROSS/linux/amd64" ]; then +arch=$(go env GOHOSTARCH) +if [ ! -d "$CROSS/linux/${arch}" ]; then echo >&2 'error: binary and cross must be run before tgz' false fi diff --git a/hack/release.sh b/hack/release.sh index 9ed3aeea4a..2eddf498d2 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -258,7 +258,7 @@ release_build() { # Upload binaries and tgz files to S3 release_binaries() { - [ -e "bundles/$VERSION/cross/linux/amd64/docker-$VERSION" ] || { + [ "$(find bundles/$VERSION -path "bundles/$VERSION/cross/*/*/docker-$VERSION")" != "" ] || { echo >&2 './hack/make.sh must be run before release_binaries' exit 1 }