From 0271372bf47743e61d49c1b1ee5b79897aa6f611 Mon Sep 17 00:00:00 2001 From: paolino Date: Thu, 9 Jan 2025 17:10:23 +0000 Subject: [PATCH] abort when trying to rewrite the last cabal tag or release tag --- scripts/buildkite/release/release-candidate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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