From 6cba038a96f4106c5e926644e52e60e3af224b81 Mon Sep 17 00:00:00 2001 From: michaeljymsgutierrez Date: Wed, 1 Jul 2026 02:21:34 +0800 Subject: [PATCH] fix(deploy): rename release branch prefix to releases to avoid ref collision --- CONTRIBUTING.md | 8 ++++---- deploy.sh | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27990cb..25420ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ flowchart TD end subgraph Releasing["Releasing Phase"] - RV["release/vX.X.X\n(update version files)"] + RV["releases/vX.X.X\n(update version files)"] end develop(develop) @@ -90,7 +90,7 @@ Work branches are created from `develop` and merged back into `develop` when rea ### Releasing Phase -`develop` is checked out into a versioned `release/vX.X.X` branch. Before merging to `release`, update the version in: +`develop` is checked out into a versioned `releases/vX.X.X` branch. Before merging to `release`, update the version in: - `README.md` - `packages/package.json` @@ -119,7 +119,7 @@ type/short-description | `refactor/` | Code restructuring, no behavior change | | `test/` | Adding or updating tests | | `hotfix/` | Urgent fix for production issues | -| `release/` | Release preparation | +| `releases/` | Release preparation | **Examples:** @@ -130,7 +130,7 @@ type/short-description - `refactor/collection-manager` - `test/query-record-coverage` - `hotfix/save-method-crash` -- `release/v2.10.0` +- `releases/v2.10.0` --- diff --git a/deploy.sh b/deploy.sh index 5f8675a..054db9b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -134,29 +134,29 @@ prepare_release_files() { # Function to publish the release version branch by creating a release branch, committing changes, pushing, merging into release, tagging, and rebasing main publish_release_version_branch() { # Create a release branch, add changes, commit, and push - run_cmd git checkout -b "release/$LATEST_VERSION" && + run_cmd git checkout -b "releases/$LATEST_VERSION" && run_cmd git add . && run_cmd git commit -m "$COMMIT_MESSAGE" && - run_cmd git push origin "release/$LATEST_VERSION" + run_cmd git push origin "releases/$LATEST_VERSION" # Generate merge commit messages if [ "$DRY_RUN" = true ]; then - echo "[dry-run] git log $TARGET_BRANCH..release/$LATEST_VERSION (generate merge commit messages)" + echo "[dry-run] git log $TARGET_BRANCH..releases/$LATEST_VERSION (generate merge commit messages)" MERGE_COMMIT_MESSAGES="[dry-run]" - MERGE_COMMIT_HEADER_AND_MESSAGES="[dry-run] release/$LATEST_VERSION" + MERGE_COMMIT_HEADER_AND_MESSAGES="[dry-run] releases/$LATEST_VERSION" else - MERGE_COMMIT_MESSAGES=$(git log $TARGET_BRANCH..release/$LATEST_VERSION \ + MERGE_COMMIT_MESSAGES=$(git log $TARGET_BRANCH..releases/$LATEST_VERSION \ --format='- [%h][%an]: %s - %ad' \ --date=format:'%Y-%m-%d %H:%M:%S' \ --no-merges \ - | grep -v ": release/v" || true) - MERGE_COMMIT_HEADER_AND_MESSAGES=$(echo -e "release/$LATEST_VERSION\n${MERGE_COMMIT_MESSAGES}") + | grep -v ": releases/v" || true) + MERGE_COMMIT_HEADER_AND_MESSAGES=$(echo -e "releases/$LATEST_VERSION\n${MERGE_COMMIT_MESSAGES}") fi # Merge the release branch into release, tag, and push run_cmd git checkout release && run_cmd git pull origin release && - run_cmd git merge --squash "release/$LATEST_VERSION" && + run_cmd git merge --squash "releases/$LATEST_VERSION" && run_cmd git commit -m "$MERGE_COMMIT_HEADER_AND_MESSAGES" && run_cmd git push origin release && run_cmd git tag -a "$LATEST_VERSION" -m "$MERGE_COMMIT_HEADER_AND_MESSAGES" && @@ -182,8 +182,8 @@ cleanup_release_version_branch() { run_cmd git push -f origin canary && # Delete the release branch both locally and remotely - run_cmd git branch -D "release/$LATEST_VERSION" && - run_cmd git push origin --delete "release/$LATEST_VERSION" && + run_cmd git branch -D "releases/$LATEST_VERSION" && + run_cmd git push origin --delete "releases/$LATEST_VERSION" && # Fetch and prune remote branches, and pull updates for develop, release, main, and canary git fetch origin --prune --verbose