Skip to content

Commit c69a2dc

Browse files
committed
Checking if a variable already exists
Signed-off-by: Junior Santos <[email protected]>
1 parent ecf335a commit c69a2dc

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

hack/release.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ OFFICIAL_RELEASE=${OFFICIAL_RELEASE:-false}
4242
# LOCAL_RELEASE indicates that containerd has been built and released
4343
# locally.
4444
LOCAL_RELEASE=${LOCAL_RELEASE:-false}
45-
GOOS=$(go env GOOS)
46-
GOARCH=$(go env GOARCH)
45+
if [ -z "${GOOS:-}" ]
46+
then
47+
GOOS=$(go env GOOS)
48+
fi
49+
if [ -z "${GOARCH:-}" ]
50+
then
51+
GOARCH=$(go env GOARCH)
52+
fi
4753

4854

4955
destdir=${BUILD_DIR}/release-stage

0 commit comments

Comments
 (0)