[build] Added automated API javadoc generation scripting (#53)

This commit is contained in:
Langston Smith
2019-11-18 11:28:20 -08:00
committed by GitHub
parent 8b20a92880
commit 3cc7e29dd1
2 changed files with 46 additions and 1 deletions

View File

@@ -172,6 +172,15 @@ commands:
gcloud auth activate-service-account --key-file secret.json --project mapbox-gl-native-android
rm secret.json
fi
generate-api-javadoc:
steps:
- run:
name: Generate Maps SDK API javadoc and transfer to `/android-docs`
command: |
export VERSION_TAG=${CIRCLE_TAG}
export GITHUB_TOKEN=${DANGER_GITHUB_API_TOKEN}
export DOCS_REPO="android-docs"
bash scripts/trigger-maps-documentation-deploy-steps.sh
jobs:
# ------------------------------------------------------------------------------
@@ -346,7 +355,7 @@ jobs:
make run-android-upload-to-artifactory
fi
fi
- generate-api-javadoc
# ------------------------------------------------------------------------------
android-debug-arm-v7-buck:
docker:

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
SDK_FLAVOR=${SDK_FLAVOR:-"maps"}
step "Triggering automated site and documentation generation for ${SDK_FLAVOR} SDK ${VERSION_TAG}"
# No branch specified, so default branch will be used
request_body="{
\"request\": {
\"message\": \"[${SDK_FLAVOR}] ${VERSION_TAG} automated site and documentation generation\",
\"config\": {
\"merge_mode\": \"deep_merge\",
\"env\": {
\"SDK_FLAVOR\": \"${SDK_FLAVOR}\",
\"RELEASE_TAG\": \"${VERSION_TAG}\"
}
}
}
}"
step "Making request…"
# Request URL set to docs-sandbox while testing
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${TRAVISCI_API_TOKEN}" \
-d "${request_body}" \
https://api.travis-ci.com/repo/mapbox%2F${DOCS_REPO}/requests