From 1d2d7d05e5d9a4fb463ed1ddfbfbc99686e584f6 Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Fri, 8 Apr 2016 11:55:28 +0100 Subject: [PATCH] Allow override remote name in mergePR script --- scripts/merge-PR.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/merge-PR.sh b/scripts/merge-PR.sh index b12e02f2c5..d7225e6d38 100755 --- a/scripts/merge-PR.sh +++ b/scripts/merge-PR.sh @@ -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