Skip to content

Commit

Permalink
fix: add check if the s3 bucket contains the version already
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed Feb 13, 2023
1 parent b2b254b commit 6e516f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions release-scripts/validate-repository.sh
@@ -1,7 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail

VERSION_TAG="v$(cat binary-releases/version)"

if git describe --contains --tags; then
echo "This commit has already been released."
exit 1
fi

aws s3 ls s3://"${PUBLIC_S3_BUCKET}"/cli/"${VERSION_TAG}"/
if [ "${?}" -eq "0" ]; then
echo "Version ${VERSION_TAG} has already been released."
exit 1
fi

0 comments on commit 6e516f5

Please sign in to comment.