Skip to content

Commit

Permalink
allow api docs generation script to switch to designated branch inste…
Browse files Browse the repository at this point in the history
…ad of trunk

this lets us pass in a tag name in case trunk is not where it needs to be for the documentation
  • Loading branch information
titusfortner committed Dec 6, 2023
1 parent 1443699 commit 5260f93
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions generate_api_docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

API_DOCS_LANGUAGE=$1
BRANCH_NAME=${2:-trunk}

case ${API_DOCS_LANGUAGE} in
java)
Expand Down Expand Up @@ -75,10 +76,10 @@ N | n) exit ;;
esac

echo "Committing changes"
git commit -am "updating API docs"
git commit -am "updating API docs for $API_DOCS_LANGUAGE"

echo "pushing to origin gh-pages"
git push origin gh-pages

echo "switching back to trunk branch"
git checkout trunk
echo "switching back to designated branch"
git checkout $BRANCH_NAME

0 comments on commit 5260f93

Please sign in to comment.