diff options
author | Roman Ivanov <ivanov-jr@mail.ru> | 2017-09-03 17:44:33 -0700 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2017-09-03 17:44:33 -0700 |
commit | 546bae162b3e3d59cc53ff6e1f3cc0d8983e3692 (patch) | |
tree | b22633d8358df1a0edab11422f70792b03b20800 /fast-forward-merge.sh | |
parent | 589f08fe29385e47968381a6bda30e5b2bfee5aa (diff) | |
download | checkstyle-546bae162b3e3d59cc53ff6e1f3cc0d8983e3692.tar.gz |
minor: move file fast-forward-merge.sh to .ci/fast-forward-merge.sh
Diffstat (limited to 'fast-forward-merge.sh')
-rwxr-xr-x | fast-forward-merge.sh | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/fast-forward-merge.sh b/fast-forward-merge.sh deleted file mode 100755 index bf118bc75..000000000 --- a/fast-forward-merge.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# GitHub does not support fast-forward merge. -# This script is intended to simplify merge of Pull Requests to keep history linear (fast-forwarded) -# All Pull Requests from GitHub to our project has to be applied to our code by this script. - -set -e - -if [ $# -eq 0 ] - then - echo "$(basename "$0") FORK_USER_NAME USER_BRANCH -example: - - ./$(basename "$0") konstantinos issue73 -" - exit 0; -fi - -GIT_REPO=checkstyle -FORK_USER_NAME=$1 -USER_BRANCH=$2 -REPO=${FORK_USER_NAME}-fork -LOCAL_USER_BRANCH=${FORK_USER_NAME}-${USER_BRANCH} - -echo "removing remote ${REPO} if present ..." -git remote rm ${REPO} | true - -echo "adding remote ..." -git remote add ${REPO} https://github.com/${FORK_USER_NAME}/${GIT_REPO}.git -git fetch ${REPO} - -echo "removing remote ${LOCAL_USER_BRANCH} if present ..." -git branch -D ${LOCAL_USER_BRANCH} | true - -echo "creating local branch ..." -git checkout -b ${LOCAL_USER_BRANCH} ${REPO}/${USER_BRANCH} - -echo "rebasing over master ..." -git rebase master - -echo "merge to master ..." -git checkout master -git merge ${LOCAL_USER_BRANCH} --ff-only - -echo "removing local branch ..." -git branch -D ${LOCAL_USER_BRANCH} - -echo "removing remote ..." -git remote rm ${REPO} |