From 4e3b1c34d7966dfc448e9f5c786facaf8337363a Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Fri, 3 Mar 2017 10:48:50 -0500 Subject: [PATCH] Update release script Had an issue where I don't git pull / merge with master after the PR has been merged. This adds an option to sync with master before continuing. --- script/release.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script/release.sh b/script/release.sh index d4f95dc9..29e8226c 100755 --- a/script/release.sh +++ b/script/release.sh @@ -71,6 +71,7 @@ clone() { cd $CLI git remote remove origin git remote add origin git@github.com:$ORIGIN_REPO/$CLI.git + git remote add upstream http://github.com/$UPSTREAM_REPO/$CLI git checkout -b release-$1 cd .. } @@ -134,6 +135,13 @@ git_pull() { cd .. } + +git_sync() { + cd $CLI + git fetch upstream master + git rebase upstream/master +} + push() { CHANGES=$(cat changes.txt) # Release it! @@ -217,6 +225,7 @@ main() { "Generate changelog" "Generate GitHub changelog" "Create PR" + "Sync with master" "Build binaries" "Upload the binaries and push to GitHub release page" "Clean" @@ -240,6 +249,9 @@ main() { "Create PR") git_commit $VERSION ;; + "Sync with master") + git_sync + ;; "Build binaries") build_binaries ;;