From 4cc4bed785d2e66c947f76e618aec9469d6e081a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LAGACHE?= Date: Tue, 6 Jan 2026 16:35:44 +0100 Subject: [PATCH] chore(release): 1.1.9-rc5 --- release | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/release b/release index ebeea5eb..b739d8d6 100755 --- a/release +++ b/release @@ -9,6 +9,20 @@ if [ -z "$1" ]; then fi VERSION=$1 +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [ "$CURRENT_BRANCH" = "main" ]; then + if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: On 'main' branch, only release tags (X.Y.Z) are allowed." + exit 1 + fi +else + if [[ ! "$VERSION" =~ -rc ]]; then + echo "Error: On branch '$CURRENT_BRANCH', only RC tags (containing -rc) are allowed." + exit 1 + fi +fi + CLEAN_VERSION=${VERSION#v} CURRENT_DATE=$(date +%Y-%m-%d)