From 5260f93c17ac4342b8c68bc878487a7a10db3a02 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Wed, 6 Dec 2023 12:28:31 -0600 Subject: [PATCH] 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 --- generate_api_docs.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generate_api_docs.sh b/generate_api_docs.sh index 56eb8bf0755ca..d7fdb5a76446a 100755 --- a/generate_api_docs.sh +++ b/generate_api_docs.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash API_DOCS_LANGUAGE=$1 +BRANCH_NAME=${2:-trunk} case ${API_DOCS_LANGUAGE} in java) @@ -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