From 5bdba0a49125b446584fecf3c9fb725871422915 Mon Sep 17 00:00:00 2001 From: spypsy Date: Thu, 14 Dec 2023 17:26:55 +0000 Subject: [PATCH] fix: build scripts if statements (#3700) - Fix check for dry deploy - always run terraform if we've marked resource to taint --- build-system/scripts/deploy_terraform_services | 2 +- l1-contracts/scripts/ci_deploy_contracts.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-system/scripts/deploy_terraform_services b/build-system/scripts/deploy_terraform_services index 879ca6a5290..7ae1bfa4ec2 100755 --- a/build-system/scripts/deploy_terraform_services +++ b/build-system/scripts/deploy_terraform_services @@ -24,7 +24,7 @@ cd $PROJECT_DIR # Bail out if nothing changed. CONTENT_HASH=$(calculate_content_hash $CHECK_REBUILD_REPOSITORY) echo "Last successfully deployed commit: $CONTENT_HASH" -if check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then +if [ -z "$TO_TAINT" ] && check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then echo "No changes detected, skipping deployment." exit 0 fi diff --git a/l1-contracts/scripts/ci_deploy_contracts.sh b/l1-contracts/scripts/ci_deploy_contracts.sh index 15a0050d34a..33daedaf6e1 100755 --- a/l1-contracts/scripts/ci_deploy_contracts.sh +++ b/l1-contracts/scripts/ci_deploy_contracts.sh @@ -33,7 +33,7 @@ for KEY in ROLLUP_CONTRACT_ADDRESS REGISTRY_CONTRACT_ADDRESS INBOX_CONTRACT_ADDR export TF_VAR_$KEY=$VALUE done -if [ -n "${DRY_DEPLOY:-}" ]; then +if [ "$DRY_DEPLOY" -eq 1 ]; then echo "DRY_DEPLOY: deploy_terraform l1-contracts ./terraform" echo "DRY_DEPLOY: tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$DEPLOY_TAG-deployed" else