Parcourir la source

fix: update branch validation in release script

- Modified the branch check in the release script to include 'main' as an acceptable branch alongside 'dev' and 'master', ensuring users are correctly informed about valid branches for the release process.
yb il y a 2 semaines
Parent
commit
a931aa074f
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      release.sh

+ 2 - 2
release.sh

@@ -97,8 +97,8 @@ section_header "🚀 Interactive Release Process"
 # Step 1: Check if we are on dev or master branch
 info_message "Checking current branch..."
 CURRENT_BRANCH=$(git branch --show-current)
-if [ "$CURRENT_BRANCH" != "dev" ] && [ "$CURRENT_BRANCH" != "master" ]; then
-    error_exit "Must be on 'dev' or 'master' branch. Current branch: $CURRENT_BRANCH. Please switch to dev or master branch first."
+if [ "$CURRENT_BRANCH" != "dev" ] && [ "$CURRENT_BRANCH" != "master" ] && [ "$CURRENT_BRANCH" != "main" ]; then
+    error_exit "Must be on 'dev', 'master', or 'main' branch. Current branch: $CURRENT_BRANCH. Please switch to dev, master, or main branch first."
 fi
 success_message "Currently on $CURRENT_BRANCH branch"