Skip to content

Commit e3ad034

Browse files
add a timeout to dashing (flutter#60723)
1 parent 3f4f915 commit e3ad034

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

dev/bots/docs.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ function create_docset() {
5353
# show the end of it if there was a problem.
5454
echo "Building Flutter docset."
5555
rm -rf flutter.docset
56-
(dashing build --source ./doc --config ./dashing.json > /tmp/dashing.log 2>&1 || (tail -100 /tmp/dashing.log; false)) && \
56+
# If dashing gets stuck, Cirrus will time out the build after an hour, and we
57+
# never get to see the logs. Thus, we time it out after 30 minutes to see the
58+
# logs.
59+
(timeout '30m' dashing build --source ./doc --config ./dashing.json > /tmp/dashing.log 2>&1 || \
60+
(echo 'Dashing failed! Tailing last 200 lines of log...'; tail -200 /tmp/dashing.log; exit 1)) && \
5761
cp ./doc/flutter/static-assets/favicon.png ./flutter.docset/icon.png && \
5862
"$DART" ./dashing_postprocess.dart && \
5963
tar cf flutter.docset.tar.gz --use-compress-program="gzip --best" flutter.docset
@@ -111,7 +115,7 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
111115
fi
112116

113117
# Install and activate dartdoc.
114-
"$PUB" global activate dartdoc 0.31.0
118+
"$PUB" global activate dartdoc 0.32.1
115119

116120
# This script generates a unified doc set, and creates
117121
# a custom index.html, placing everything into dev/docs/doc.
@@ -120,16 +124,16 @@ fi
120124
(cd "$FLUTTER_ROOT" && "$DART" "$FLUTTER_ROOT/dev/tools/dartdoc.dart")
121125
(cd "$FLUTTER_ROOT" && "$DART" "$FLUTTER_ROOT/dev/tools/java_and_objc_doc.dart")
122126

123-
# Create offline doc archives.
124-
(cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
125-
(cd "$FLUTTER_ROOT/dev/docs"; create_docset)
126-
(cd "$FLUTTER_ROOT/dev/docs"; move_offline_into_place)
127-
128-
# Ensure google webmaster tools can verify our site.
129-
cp "$FLUTTER_ROOT/dev/docs/google2ed1af765c529f57.html" "$FLUTTER_ROOT/dev/docs/doc"
130-
131127
# Upload new API docs when running on Cirrus
132128
if [[ -n "$CIRRUS_CI" && -z "$CIRRUS_PR" ]]; then
129+
# Create offline doc archives.
130+
(cd "$FLUTTER_ROOT/dev/docs"; create_offline_zip)
131+
(cd "$FLUTTER_ROOT/dev/docs"; create_docset)
132+
(cd "$FLUTTER_ROOT/dev/docs"; move_offline_into_place)
133+
134+
# Ensure google webmaster tools can verify our site.
135+
cp "$FLUTTER_ROOT/dev/docs/google2ed1af765c529f57.html" "$FLUTTER_ROOT/dev/docs/doc"
136+
133137
echo "This is not a pull request; considering whether to upload docs... (branch=$CIRRUS_BRANCH)"
134138
if [[ "$CIRRUS_BRANCH" == "master" ]]; then
135139
echo "Updating $CIRRUS_BRANCH docs: https://master-api.flutter.dev/"

0 commit comments

Comments
 (0)