From 7581c4d2cd095182268e3b94651805bbd776333a Mon Sep 17 00:00:00 2001 From: Tushar Makkar Date: Fri, 4 Nov 2016 10:22:26 +0530 Subject: [PATCH] Fix auto updation travis issue --- update_documentation.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/update_documentation.sh b/update_documentation.sh index 6ea9810..1142dc8 100644 --- a/update_documentation.sh +++ b/update_documentation.sh @@ -23,10 +23,19 @@ URL=$(git remote -v | head -n1 | cut -f2 | cut -d" " -f1) echo "Repo url is $URL" PUSH_URL="https://$GIT_USER:$GIT_PASS@${URL:6}" +echo "Checking out $FROM_BRANCH..." && \ +git fetch origin ${FROM_BRANCH}:${FROM_BRANCH} && \ +git checkout ${FROM_BRANCH} + +# Get the current branch +export PAGER=cat +CURRENT_BRANCH=$(git log -n 1 --pretty=%d HEAD | cut -d"," -f3 | cut -d" " -f2 | cut -d")" -f1) +echo "current branch is '$CURRENT_BRANCH'" + if [ "$CURRENT_BRANCH" = "$FROM_BRANCH" ] ; then # Checkout the dev branch #git checkout $FROM_BRANCH && \ - #echo "Checking out $TO_BRANCH..." && \ + echo "Checking out $TO_BRANCH..." && \ # Checkout the latest stable git fetch origin ${TO_BRANCH}:${TO_BRANCH} && \