diff --git a/backport.sh b/backport.sh index e212af72c67c..a1dc083761ac 100755 --- a/backport.sh +++ b/backport.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Example: ./backport.sh 'feature/im-play-nightly' 47bc4b2ade1baffbb6693ae149bca6126c2f352e 2.40 2.39 2.38 2.37 +# Usage: ./backport.sh 'feature/im-play-nightly' 47bc4b2ade1baffbb6693ae149bca6126c2f352e 2.40 2.39 2.38 2.37 set -euo pipefail @@ -53,11 +53,7 @@ for branch in "${branches[@]}"; do git cherry-pick "$commit" git push origin "${base_branch}_${branch}" gh pr create --head "${base_branch}_${branch}" --base "$branch" --title "backport: $pr_title" --body "$pr_url" --reviewer "$pr_reviewer" -done - -git checkout "$current_branch" - -# Delete local branches -for branch in "${branches[@]}"; do + # clean up + git checkout "$current_branch" git branch -D "${base_branch}_${branch}" done