From c68a937e0110260130c74c3b150d8cb5c73260a9 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 16 Sep 2021 20:12:11 +0800 Subject: [PATCH] Improve the bump tool so that it can cherry-pick a merge type commit --- tools/bump.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/bump.sh b/tools/bump.sh index 393b754..00bed1e 100755 --- a/tools/bump.sh +++ b/tools/bump.sh @@ -128,10 +128,12 @@ release() { git checkout -b "$_release_branch" _new_release_branch=true else + # cherry-pick the latest commit from default branch to release branch + _last_commit="$(git rev-parse $DEFAULT_BRANCH)" git checkout "$_release_branch" - # cherry-pick the latest commit from master branch to release branch - git cherry-pick "$(git rev-parse $DEFAULT_BRANCH)" + git cherry-pick "$_last_commit" -m 1 fi + fi echo -e "Bump version to $_version\n"