|
|
|
@ -62,7 +62,7 @@ cd "${dir}/../../.." |
|
|
|
|
# Clones the API reference GitHub Pages branch |
|
|
|
|
PAGES_PATH="/tmp/gh-pages" |
|
|
|
|
rm -rf "${PAGES_PATH}" |
|
|
|
|
git clone --single-branch https://github.com/grpc/grpc -b gh-pages "${PAGES_PATH}" |
|
|
|
|
git clone -o upstream --single-branch https://github.com/grpc/grpc -b gh-pages "${PAGES_PATH}" |
|
|
|
|
|
|
|
|
|
# Generates Core / C++ / ObjC / PHP documents |
|
|
|
|
rm -rf "${PAGES_PATH}/core" "${PAGES_PATH}/cpp" "${PAGES_PATH}/objc" "${PAGES_PATH}/php" |
|
|
|
@ -91,20 +91,4 @@ echo "=================================================================" |
|
|
|
|
echo " Successfully generated documents for version ${GRPC_VERSION}." |
|
|
|
|
echo "=================================================================" |
|
|
|
|
|
|
|
|
|
# Uploads to GitHub |
|
|
|
|
if [[ -n "${GITHUB_USER}" ]]; then |
|
|
|
|
BRANCH_NAME="doc-${GRPC_VERSION}" |
|
|
|
|
|
|
|
|
|
(cd "${PAGES_PATH}" |
|
|
|
|
git remote add "${GITHUB_USER}" "git@github.com:${GITHUB_USER}/grpc.git" |
|
|
|
|
git checkout -b "${BRANCH_NAME}" |
|
|
|
|
git add --all |
|
|
|
|
git commit -m "Auto-update documentation for gRPC ${GRPC_VERSION}" |
|
|
|
|
git push --set-upstream "${GITHUB_USER}" "${BRANCH_NAME}" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
echo "Please check https://github.com/${GITHUB_USER}/grpc/tree/${BRANCH_NAME} for generated documents." |
|
|
|
|
echo "Click https://github.com/grpc/grpc/compare/gh-pages...${GITHUB_USER}:${BRANCH_NAME} to create a PR." |
|
|
|
|
else |
|
|
|
|
echo "Please check ${PAGES_PATH} for generated documents." |
|
|
|
|
fi |
|
|
|
|
echo "Generated docs are in ${PAGES_PATH}, use the internal release script to create a PR." |
|
|
|
|