Allow override remote name in mergePR script

This commit is contained in:
Martyn Taylor 2016-04-08 11:55:28 +01:00 committed by Clebert Suconic
parent 2f0ecb3065
commit 1d2d7d05e5
1 changed files with 10 additions and 6 deletions

View File

@ -29,13 +29,17 @@
# Notice: you should add +refs/pull/*/head to your fetch config on upstream
# as specified on https://github.com/apache/activemq-artemis/blob/master/docs/hacking-guide/en/maintainers.md
git fetch origin
git fetch apache
git fetch upstream
ARTEMIS_USER_REMOTE_NAME=${ARTEMIS_USER_REMOTE_NAME:-origin}
ARTEMIS_APACHE_REMOTE_NAME=${ARTEMIS_APACHE_REMOTE_NAME:-apache}
ARTEMIS_GITHUB_REMOTE_NAME=${ARTEMIS_GITHUB_REMOTE_NAME:-upstream}
git checkout apache/master -B master
git checkout upstream/pr/$1 -B $1
git pull --rebase apache master
git fetch $ARTEMIS_USER_REMOTE_NAME
git fetch $ARTEMIS_APACHE_REMOTE_NAME
git fetch $ARTEMIS_GITHUB_REMOTE_NAME
git checkout $ARTEMIS_APACHE_REMOTE_NAME/master -B master
git checkout $ARTEMIS_GITHUB_REMOTE_NAME/pr/$1 -B $1
git pull --rebase $ARTEMIS_APACHE_REMOTE_NAME master
git checkout master
git merge --no-ff $1 -m "This closes #$*"
git branch -D $1