Skip to content

Commit 5260f93

Browse files
committed
allow api docs generation script to switch to designated branch instead of trunk
this lets us pass in a tag name in case trunk is not where it needs to be for the documentation
1 parent 1443699 commit 5260f93

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

generate_api_docs.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
API_DOCS_LANGUAGE=$1
4+
BRANCH_NAME=${2:-trunk}
45

56
case ${API_DOCS_LANGUAGE} in
67
java)
@@ -75,10 +76,10 @@ N | n) exit ;;
7576
esac
7677

7778
echo "Committing changes"
78-
git commit -am "updating API docs"
79+
git commit -am "updating API docs for $API_DOCS_LANGUAGE"
7980

8081
echo "pushing to origin gh-pages"
8182
git push origin gh-pages
8283

83-
echo "switching back to trunk branch"
84-
git checkout trunk
84+
echo "switching back to designated branch"
85+
git checkout $BRANCH_NAME

0 commit comments

Comments
 (0)