diff options
author | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2017-12-24 13:42:12 +0100 |
---|---|---|
committer | Théo Zimmermann <theo.zimmermann@univ-paris-diderot.fr> | 2017-12-24 13:42:12 +0100 |
commit | 8eacdda782791bf4a7b58bdf19e4ca1bbd01a705 (patch) | |
tree | 37ce5cba55b7c812d95fd28e88356daa83533748 /dev | |
parent | dea75d74c222c25f6aa6c38506ac7a51b339e9c6 (diff) |
Update backport script for more control.
Diffstat (limited to 'dev')
-rwxr-xr-x | dev/tools/backport-pr.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dev/tools/backport-pr.sh b/dev/tools/backport-pr.sh index 4c4dbe1e9..d7acf01f1 100755 --- a/dev/tools/backport-pr.sh +++ b/dev/tools/backport-pr.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -# Usage: dev/tools/backport-pr.sh <PR number> +# Usage: dev/tools/backport-pr.sh <PR number> [--stop-before-merging] set -e PRNUM=$1 +OPTION=$2 if ! git log master --grep "Merge PR #${PRNUM}" | grep "." > /dev/null; then echo "PR #${PRNUM} does not exist." @@ -49,6 +50,10 @@ else fi +if [[ "${OPTION}" == "--stop-before-merging" ]]; then + exit 0 +fi + git merge -S --no-ff ${BRANCH} -m "${MESSAGE}" git branch -d ${BRANCH} |