|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set -eo pipefail |
|
|
|
|
|
export PYTHONUNBUFFERED=1 |
|
|
|
export PATH="${HOME}/.local/bin:${PATH}" |
|
|
|
|
|
python3 -m pip install --require-hashes -r .kokoro/requirements.txt |
|
python3 -m nox --version |
|
|
|
|
|
nox -s docs |
|
|
|
|
|
python3 -m docuploader create-metadata \ |
|
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ |
|
--version=$(python3 setup.py --version) \ |
|
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ |
|
--distribution-name=$(python3 setup.py --name) \ |
|
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ |
|
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ |
|
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) |
|
|
|
cat docs.metadata |
|
|
|
|
|
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}" |
|
|
|
|
|
|
|
nox -s docfx |
|
|
|
|
|
python3 -m docuploader create-metadata \ |
|
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ |
|
--version=$(python3 setup.py --version) \ |
|
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ |
|
--distribution-name=$(python3 setup.py --name) \ |
|
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ |
|
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ |
|
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) |
|
|
|
cat docs.metadata |
|
|
|
|
|
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}" |
|
|