Created
May 26, 2020 08:30
-
-
Save fruch/404cf7996136b9b10d9c956058b8f00c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -x | |
| set -e | |
| commit_to_backport=$* | |
| git fetch upstream | |
| function backport() { | |
| branch=${1} | |
| echo "Backporting ${commit_to_backport} to ${branch}.." | |
| git branch -D ${branch} || echo "no branch" | |
| git checkout upstream/${branch} --track | |
| git cherry-pick -x ${commit_to_backport} | |
| git push upstream ${branch} | |
| echo "Done." | |
| } | |
| #backport "branch-2019.1" | |
| #backport "branch-3.1" | |
| #backport "branch-3.2" | |
| #backport "branch-3.3" | |
| #backport "manager" | |
| #backport "manager-2.0" | |
| #backport "manager-2.1" | |
| backport "branch-4.0" | |
| backport "branch-4.1" | |
| git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment