diff --git a/update_documentation.sh b/update_documentation.sh index 3304176..56ad16b 100644 --- a/update_documentation.sh +++ b/update_documentation.sh @@ -28,6 +28,8 @@ URL=$(git remote -v | head -n1 | cut -f2 | cut -d" " -f1) echo "Repo url is $URL" PUSH_URL="https://$GIT_USER:$GIT_PASS@${URL:8}" +git remote set-url origin ${PUSH_URL} + echo "Checking out $FROM_BRANCH..." && \ git fetch origin ${FROM_BRANCH}:${FROM_BRANCH} && \ git checkout ${FROM_BRANCH} @@ -44,7 +46,7 @@ git merge ${FROM_BRANCH} && \ # Push changes back to remote vcs echo "Pushing changes..." && \ -git push ${PUSH_URL} && \ +git push && \ echo "Merge complete!" || \ echo "Error Occurred. Merge failed" @@ -56,4 +58,4 @@ echo "Sphinx not able to generate HTML" git status && git add . && git commit -m "Auto updating documentation from $CURRENT_BRANCH" && -git push ${PUSH_URL} || echo "Changes not pushed" && exit 1 +git push && echo "Documentation pushed"