diff --git a/scripts/buildkite/release/release-candidate.sh b/scripts/buildkite/release/release-candidate.sh index 973968cf722..c52d5bf26ba 100755 --- a/scripts/buildkite/release/release-candidate.sh +++ b/scripts/buildkite/release/release-candidate.sh @@ -31,8 +31,18 @@ OLD_GIT_TAG=$( git tag -l "v2*-*-*" | sort | tail -n1) LAST_RELEASE_DATE=$(tag_date "$OLD_GIT_TAG") +if [ "$OLD_GIT_TAG" == "$NEW_GIT_TAG" ]; then + echo "Refusing to rewrite last release tag" + exit 1 +fi + OLD_CABAL_VERSION=$(tag_cabal_ver "$OLD_GIT_TAG") +if [ "$OLD_CABAL_VERSION" == "$NEW_CABAL_VERSION" ]; then + echo "Refusing to rewrite last release cabal version" + exit 1 +fi + CARDANO_NODE_TAG=$(cardano-node version | head -n1 | awk '{print $2}') if [ "$BUILDKITE_BRANCH" == "master" ]; then