From 4f7e300f85bb4c1efd463504f960ae14c216b5ce Mon Sep 17 00:00:00 2001 From: Jitendra Adhikari Date: Sat, 3 Aug 2019 09:44:08 +0700 Subject: [PATCH] refactor: prepare travis support, skip update if current branch is deploy branch --- please | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/please b/please index e953dac..02e9d08 100644 --- a/please +++ b/please @@ -244,9 +244,15 @@ ok "Repository ${REPO}" TMP_LOG=`tempfile -p PLZ` info "Log file ${TMP_LOG}" -info "Updating master ..." -qgit stash && qgit checkout master && qgit fetch --tags && qgit pull origin master --rebase -ok +DEPLOY_BRANCH="${DEPLOY_BRANCH:-master}" +if [ -z "$TRAVIS" ] || [ "$DEPLOY_BRANCH" == "$TRAVIS_BRANCH" ]; then + info "Updating $DEPLOY_BRANCH ..." + qgit stash && qgit checkout $DEPLOY_BRANCH && qgit fetch --tags && qgit pull origin $DEPLOY_BRANCH --rebase + ok +else + info "Skip release" + exit 0 +fi info "Getting latest releases ..." VERSION=`github "https://api.${GH_REPO}/releases?per_page=1" | jq -r '.[0]?.tag_name?'`