From dfdba4b5c6fb0c75f7f463e0b5eb71e6e7d1b667 Mon Sep 17 00:00:00 2001 From: ludamad Date: Tue, 5 Sep 2023 14:47:21 -0400 Subject: [PATCH] fix(build-system): undefined IMAGE_TAG and ARG_TAG (#2030) --- build-system/scripts/deploy_dockerhub | 4 +--- build-system/scripts/deploy_npm | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build-system/scripts/deploy_dockerhub b/build-system/scripts/deploy_dockerhub index 39e3f3c91ab..2473eda4fa3 100755 --- a/build-system/scripts/deploy_dockerhub +++ b/build-system/scripts/deploy_dockerhub @@ -7,6 +7,7 @@ if [ -z "$COMMIT_TAG" ]; then fi REPOSITORY=$1 +IMAGE_TAG=$COMMIT_TAG_VERSION IMAGE_COMMIT_URI=$ECR_DEPLOY_URL/$REPOSITORY:$COMMIT_HASH IMAGE_DEPLOY_URI=aztecprotocol/$REPOSITORY:$IMAGE_TAG IMAGE_LATEST_URI=aztecprotocol/$REPOSITORY:latest @@ -34,9 +35,6 @@ if [ -z "$VERSION" ]; then exit 1 fi -IMAGE_TAG=$COMMIT_TAG_VERSION - - echo "Deploying to dockerhub: $IMAGE_DEPLOY_URI" # Login. diff --git a/build-system/scripts/deploy_npm b/build-system/scripts/deploy_npm index 4351c69e686..fa732f99238 100755 --- a/build-system/scripts/deploy_npm +++ b/build-system/scripts/deploy_npm @@ -42,7 +42,7 @@ if [ -n "$TAG" ]; then TAG_ARG="--tag $TAG" fi -readonly PUBLISHED_VERSION=$(npm show . version $TAG_ARG 2> /dev/null) +readonly PUBLISHED_VERSION=$(npm show . version ${TAG_ARG:-} 2> /dev/null) readonly HIGHER_VERSION=$(npx semver ${VERSION} ${PUBLISHED_VERSION} | tail -1) # If there is already a published package equal to given version, assume this is a re-run of a deploy, and early out.