Unverified Commit 271b8dd6 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Fix doc generation scripts (#62340)

parent 8e0eee90
...@@ -272,6 +272,7 @@ task: ...@@ -272,6 +272,7 @@ task:
- name: hostonly_devicelab_tests-3_last-linux - name: hostonly_devicelab_tests-3_last-linux
<< : *LINUX_SHARD_TEMPLATE << : *LINUX_SHARD_TEMPLATE
# This task populates `docs_cache`
- name: docs-linux # linux-only - name: docs-linux # linux-only
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_drive/**', 'packages/flutter_localizations/**', 'packages/flutter_goldens/**', 'bin/**') || $CIRRUS_PR == ''" only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_drive/**', 'packages/flutter_localizations/**', 'packages/flutter_goldens/**', 'bin/**') || $CIRRUS_PR == ''"
environment: environment:
...@@ -285,17 +286,8 @@ task: ...@@ -285,17 +286,8 @@ task:
script: script:
- ./dev/bots/docs.sh docs - ./dev/bots/docs.sh docs
- name: docs_offline-linux # linux-only # This task relies on `docs_cache` having been populated in `docs-linux`.
only_if: "$CIRRUS_PR == ''" # It updates the cache with the docset gzip file it generates.
depends_on:
- docs-linux
docs_cache:
folder: dev/docs
fingerprint_script:
- echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script:
- ./dev/bots/docs.sh offline
- name: docs_docset-linux # linux-only - name: docs_docset-linux # linux-only
only_if: "$CIRRUS_PR == ''" only_if: "$CIRRUS_PR == ''"
depends_on: depends_on:
...@@ -304,16 +296,17 @@ task: ...@@ -304,16 +296,17 @@ task:
CPU: 2 CPU: 2
docs_cache: docs_cache:
folder: dev/docs folder: dev/docs
reupload_on_changes: true
fingerprint_script: fingerprint_script:
- echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}" - echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script: script:
- ./dev/bots/docs.sh docset - ./dev/bots/docs.sh docset
# This task relies on an updated `docs_cache` from `docs_docset-linux`
- name: docs_deploy-linux # linux-only - name: docs_deploy-linux # linux-only
only_if: "$CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH == 'stable'" only_if: "$CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH == 'stable'"
depends_on: depends_on:
- docs-linux - docs-linux
- docs_offline-linux
- docs_docset-linux - docs_docset-linux
environment: environment:
# For uploading master docs to Firebase master branch staging site # For uploading master docs to Firebase master branch staging site
......
...@@ -175,10 +175,9 @@ fi ...@@ -175,10 +175,9 @@ fi
case "$COMMAND" in case "$COMMAND" in
docs) docs)
generate_docs generate_docs
;; if [[ -n "$CIRRUS_CI" && -z "$CIRRUS_PR" ]]; then
offline) (cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
assert_not_in_pr fi
(cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
;; ;;
docset) docset)
assert_not_in_pr assert_not_in_pr
...@@ -189,6 +188,6 @@ case "$COMMAND" in ...@@ -189,6 +188,6 @@ case "$COMMAND" in
deploy_docs deploy_docs
;; ;;
*) *)
>&2 echo "Usage: $0 {docs|offline|docset|deploy}" >&2 echo "Usage: $0 {docs|docset|deploy}"
exit 1 exit 1
esac esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment