Skip to content

Commit

Permalink
Adding commit and push to branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmakkar08 committed Nov 4, 2016
1 parent 7581c4d commit 9b722be
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions update_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 9b722be

Please sign in to comment.