From dfc938999262f1b716c6a84585917e4ff1ce6d48 Mon Sep 17 00:00:00 2001 From: Ridai Govinda Pombo Date: Thu, 30 Jul 2020 11:13:52 -0300 Subject: [PATCH] Wrap AWS check inside of an if --- release.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release.sh b/release.sh index ddd136b4..c543da98 100755 --- a/release.sh +++ b/release.sh @@ -81,8 +81,7 @@ done for i in *.tgz do if [ -z "${local_test_release}" ]; then - aws s3 ls s3://yourbase-artifacts/yb/${VERSION}/$i - if [[ $? -eq 0 ]]; then + if aws s3 ls s3://yourbase-artifacts/yb/${VERSION}/$i; then echo "A version for ${VERSION} already exists! Not releasing this version." exit 1 fi