diff --git a/update_documentation.sh b/update_documentation.sh index 1142dc8..c75fff2 100644 --- a/update_documentation.sh +++ b/update_documentation.sh @@ -27,32 +27,25 @@ 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..." && \ - - # Checkout the latest stable - git fetch origin ${TO_BRANCH}:${TO_BRANCH} && \ - git checkout ${TO_BRANCH} && \ - - # Merge the dev into latest stable - echo "Merging changes..." && \ - git merge ${FROM_BRANCH} && \ - - # Push changes back to remote vcs - echo "Pushing changes..." && \ - git push ${PUSH_URL} && \ - echo "Merge complete!" || \ - echo "Error Occurred. Merge failed" -else - echo "Not on $FROM_BRANCH. Skipping merge" -fi +echo "Checking out $TO_BRANCH..." && \ +# Checkout the latest stable +git fetch origin ${TO_BRANCH}:${TO_BRANCH} && \ +git checkout ${TO_BRANCH} && \ + +# Merge the dev into latest stable +echo "Merging changes..." && \ +git merge ${FROM_BRANCH} && \ + +# Push changes back to remote vcs +echo "Pushing changes..." && \ +git push ${PUSH_URL} && \ +echo "Merge complete!" || \ +echo "Error Occurred. Merge failed" pip install -r requirements.txt sphinx-apidoc -o docs -f voluptuous + +git status && git add . && +git commit -m "Auto updating documentation from $CURRENT_BRANCH" && +git push ${PUSH_URL}