Skip to content

Commit

Permalink
chore: clean up within main loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsV2 committed Nov 13, 2023
1 parent 7f90b6a commit 29e66bc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions backport.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

0 comments on commit 29e66bc

Please sign in to comment.