From 9d9bca5e3bea5197a9ff491dc08d0558b5ba59c6 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 9 Aug 2021 13:17:29 +0800 Subject: [PATCH] Improve the bump tool --- tools/bump.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tools/bump.sh b/tools/bump.sh index 8bd5105..393b754 100755 --- a/tools/bump.sh +++ b/tools/bump.sh @@ -123,19 +123,15 @@ release() { _release_branch="$_major-$_minor-stable" - if $opt_manual; then - echo -e "Bump version to $_version (manual release)\n" - bump "$_version" - exit 0 - fi - - if [[ -z $(git branch -v | grep "$_release_branch") ]]; then - git checkout -b "$_release_branch" - _new_release_branch=true - else - git checkout "$_release_branch" - # cherry-pick the latest commit from master branch to release branch - git cherry-pick "$(git rev-parse $DEFAULT_BRANCH)" + if ! $opt_manual; then + if [[ -z $(git branch -v | grep "$_release_branch") ]]; then + git checkout -b "$_release_branch" + _new_release_branch=true + else + git checkout "$_release_branch" + # cherry-pick the latest commit from master branch to release branch + git cherry-pick "$(git rev-parse $DEFAULT_BRANCH)" + fi fi echo -e "Bump version to $_version\n"