From ecf335ad65ebe25fd3fb53cd4b21d92cbc46b8bf Mon Sep 17 00:00:00 2001 From: Junior Santos Date: Tue, 7 Jul 2020 02:18:15 -0300 Subject: [PATCH 1/2] added multi-architectures support Signed-off-by: Junior Santos --- hack/release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/release.sh b/hack/release.sh index fe99652aa..f7a1f2bb5 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -42,6 +42,8 @@ OFFICIAL_RELEASE=${OFFICIAL_RELEASE:-false} # LOCAL_RELEASE indicates that containerd has been built and released # locally. LOCAL_RELEASE=${LOCAL_RELEASE:-false} +GOOS=$(go env GOOS) +GOARCH=$(go env GOARCH) destdir=${BUILD_DIR}/release-stage @@ -66,7 +68,7 @@ download_containerd() { # copy_local_containerd copies local containerd release. copy_local_containerd() { - local -r tarball="${GOPATH}/src/github.com/containerd/containerd/releases/containerd-${VERSION}.linux-amd64.tar.gz" + local -r tarball="${GOPATH}/src/github.com/containerd/containerd/releases/containerd-${VERSION}.${GOOS}-${GOARCH}.tar.gz" if [[ ! -e "${tarball}" ]]; then echo "Containerd release is not built" exit 1 From c69a2dc7457d9d55ce0e8385fb8be12eb653add4 Mon Sep 17 00:00:00 2001 From: Junior Santos Date: Wed, 8 Jul 2020 19:51:56 -0300 Subject: [PATCH 2/2] Checking if a variable already exists Signed-off-by: Junior Santos --- hack/release.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hack/release.sh b/hack/release.sh index f7a1f2bb5..b46a0135e 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -42,8 +42,14 @@ OFFICIAL_RELEASE=${OFFICIAL_RELEASE:-false} # LOCAL_RELEASE indicates that containerd has been built and released # locally. LOCAL_RELEASE=${LOCAL_RELEASE:-false} -GOOS=$(go env GOOS) -GOARCH=$(go env GOARCH) +if [ -z "${GOOS:-}" ] +then + GOOS=$(go env GOOS) +fi +if [ -z "${GOARCH:-}" ] +then + GOARCH=$(go env GOARCH) +fi destdir=${BUILD_DIR}/release-stage