chore: improve release-check CI

This commit is contained in:
Ralph Khreish
2025-08-04 14:29:03 +03:00
parent 7a50f0c6ec
commit 587523a23b

View File

@@ -19,18 +19,21 @@ jobs:
echo "🔍 Checking if branch is in pre-release mode..."
if [[ -f .changeset/pre.json ]]; then
echo "❌ ERROR: This branch is in pre-release mode!"
echo ""
echo "Pre-release mode must be exited before merging to main."
echo ""
echo "To fix this, run the following commands in your branch:"
echo " npx changeset pre exit"
echo " git add -u"
echo " git commit -m 'chore: exit pre-release mode'"
echo " git push"
echo ""
echo "Then update this pull request."
exit 1
PRE_MODE=$(jq -r '.mode' .changeset/pre.json 2>/dev/null || echo '')
if [[ "$PRE_MODE" == "pre" ]]; then
echo "❌ ERROR: This branch is in active pre-release mode!"
echo ""
echo "Pre-release mode must be exited before merging to main."
echo ""
echo "To fix this, run the following commands in your branch:"
echo " npx changeset pre exit"
echo " git add -u"
echo " git commit -m 'chore: exit pre-release mode'"
echo " git push"
echo ""
echo "Then update this pull request."
exit 1
fi
fi
echo "✅ Not in pre-release mode - PR can be merged"
echo "✅ Not in active pre-release mode - PR can be merged"