Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8c5c720c
Unverified
Commit
8c5c720c
authored
Jul 28, 2020
by
Todd Volkert
Committed by
GitHub
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporarily disable docset generation (#62386)
https://github.com/flutter/flutter/issues/60646
parent
39fa0020
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
85 deletions
+20
-85
.cirrus.yml
.cirrus.yml
+2
-42
docs.sh
dev/bots/docs.sh
+18
-43
No files found.
.cirrus.yml
View file @
8c5c720c
...
@@ -274,58 +274,18 @@ task:
...
@@ -274,58 +274,18 @@ 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
:
# Empirically, as of October 2019, the docs-linux shard took about 30 minutes when run with
# 1 CPU and 4G of RAM. 2 CPUs reduced that to 20 minutes, more CPUs did not improve matters.
CPU
:
2
USE_IN_MEMORY_DISK
:
true
docs_cache
:
folder
:
dev/docs
fingerprint_script
:
-
echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script
:
-
./dev/bots/docs.sh docs
# This task relies on `docs_cache` having been populated in `docs-linux`.
# It updates the cache with the docset gzip file it generates.
-
name
:
docs_docset-linux
# linux-only
only_if
:
"
$CIRRUS_PR
==
''"
depends_on
:
-
docs-linux
environment
:
environment
:
# TODO(tvolkert): optimize CPU and MEMORY settings once #60646 is resolved.
# TODO(tvolkert): optimize CPU and MEMORY settings once #60646 is resolved.
CPU
:
2
CPU
:
4
MEMORY
:
8G
MEMORY
:
8G
USE_IN_MEMORY_DISK
:
true
docs_cache
:
folder
:
dev/docs
reupload_on_changes
:
true
fingerprint_script
:
-
echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script
:
-
./dev/bots/docs.sh docset
# This task relies on an updated `docs_cache` from `docs_docset-linux`
-
name
:
docs_deploy-linux
# linux-only
only_if
:
"
$CIRRUS_BRANCH
==
'master'
||
$CIRRUS_BRANCH
==
'stable'"
depends_on
:
-
docs-linux
-
docs_docset-linux
environment
:
USE_IN_MEMORY_DISK
:
true
# For uploading master docs to Firebase master branch staging site
# For uploading master docs to Firebase master branch staging site
FIREBASE_MASTER_TOKEN
:
ENCRYPTED[eb768d18798fdc5abfe09b224e1724c4d82831d715ccf90df2c79d618c317216cbd99493278361f6fe7948b409b603f0]
FIREBASE_MASTER_TOKEN
:
ENCRYPTED[eb768d18798fdc5abfe09b224e1724c4d82831d715ccf90df2c79d618c317216cbd99493278361f6fe7948b409b603f0]
# For uploading stable docs to Firebase public live site
# For uploading stable docs to Firebase public live site
FIREBASE_PUBLIC_TOKEN
:
ENCRYPTED[37e8b82f167864cae9a3f4d2cf3f37dea331d9375c295327c45de524f6c588fa6f6d63e5784f10f6d43ce29689f36c92]
FIREBASE_PUBLIC_TOKEN
:
ENCRYPTED[37e8b82f167864cae9a3f4d2cf3f37dea331d9375c295327c45de524f6c588fa6f6d63e5784f10f6d43ce29689f36c92]
docs_cache
:
folder
:
dev/docs
fingerprint_script
:
-
echo "docs_${CIRRUS_CHANGE_IN_REPO}_${CIRRUS_BUILD_ID}"
script
:
script
:
-
./dev/bots/docs.sh
deploy
-
./dev/bots/docs.sh
-
name
:
customer_testing-linux
-
name
:
customer_testing-linux
# environment:
# environment:
...
...
dev/bots/docs.sh
View file @
8c5c720c
...
@@ -37,13 +37,6 @@ function script_location() {
...
@@ -37,13 +37,6 @@ function script_location() {
echo
"
$(
cd
-P
"
$(
dirname
"
$script_location
"
)
"
>
/dev/null
&&
pwd
)
"
echo
"
$(
cd
-P
"
$(
dirname
"
$script_location
"
)
"
>
/dev/null
&&
pwd
)
"
}
}
function
assert_not_in_pr
()
{
if
[[
-z
"
$CIRRUS_CI
"
||
-n
"
$CIRRUS_PR
"
]]
;
then
>
&2
echo
"The
$COMMAND
command can only be run in Cirrus for non-PR commits."
exit
1
fi
}
function
generate_docs
()
{
function
generate_docs
()
{
# Install and activate dartdoc.
# Install and activate dartdoc.
"
$PUB
"
global activate dartdoc 0.32.1
"
$PUB
"
global activate dartdoc 0.32.1
...
@@ -90,16 +83,9 @@ function create_docset() {
...
@@ -90,16 +83,9 @@ function create_docset() {
}
}
function
deploy_docs
()
{
function
deploy_docs
()
{
(
cd
"
$FLUTTER_ROOT
/dev/docs"
;
move_offline_into_place
)
# Ensure google webmaster tools can verify our site.
# Ensure google webmaster tools can verify our site.
cp
"
$FLUTTER_ROOT
/dev/docs/google2ed1af765c529f57.html"
"
$FLUTTER_ROOT
/dev/docs/doc"
cp
"
$FLUTTER_ROOT
/dev/docs/google2ed1af765c529f57.html"
"
$FLUTTER_ROOT
/dev/docs/doc"
# To help diagnose when things go wrong.
echo
"Deploying the following files to Firebase:"
find
"
$FLUTTER_ROOT
/dev/docs"
echo
'EOL'
case
"
$CIRRUS_BRANCH
"
in
case
"
$CIRRUS_BRANCH
"
in
master
)
master
)
echo
"
$(
date
)
: Updating
$CIRRUS_BRANCH
docs: https://master-api.flutter.dev/"
echo
"
$(
date
)
: Updating
$CIRRUS_BRANCH
docs: https://master-api.flutter.dev/"
...
@@ -118,7 +104,7 @@ function deploy_docs() {
...
@@ -118,7 +104,7 @@ function deploy_docs() {
deploy 5 docs-flutter-dev
deploy 5 docs-flutter-dev
;;
;;
*
)
*
)
>
&2
echo
"
The
$COMMAND
command
cannot be run on the
$CIRRUS_BRANCH
branch."
>
&2
echo
"
Docs deployment
cannot be run on the
$CIRRUS_BRANCH
branch."
exit
1
exit
1
esac
esac
}
}
...
@@ -132,13 +118,14 @@ function move_offline_into_place() {
...
@@ -132,13 +118,14 @@ function move_offline_into_place() {
mkdir
-p
doc/offline
mkdir
-p
doc/offline
mv
flutter.docs.zip doc/offline/flutter.docs.zip
mv
flutter.docs.zip doc/offline/flutter.docs.zip
du
-sh
doc/offline/flutter.docs.zip
du
-sh
doc/offline/flutter.docs.zip
if
[[
"
$CIRRUS_BRANCH
"
==
"stable"
]]
;
then
# TODO(tvolkert): re-enable (https://github.com/flutter/flutter/issues/60646)
echo
-e
"<entry>
\n
<version>
${
FLUTTER_VERSION
}
</version>
\n
<url>https://api.flutter.dev/offline/flutter.docset.tar.gz</url>
\n
</entry>"
>
doc/offline/flutter.xml
# if [[ "$CIRRUS_BRANCH" == "stable" ]]; then
else
# echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
echo
-e
"<entry>
\n
<version>
${
FLUTTER_VERSION
}
</version>
\n
<url>https://master-api.flutter.dev/offline/flutter.docset.tar.gz</url>
\n
</entry>"
>
doc/offline/flutter.xml
# else
fi
# echo -e "<entry>\n <version>${FLUTTER_VERSION}</version>\n <url>https://master-api.flutter.dev/offline/flutter.docset.tar.gz</url>\n</entry>" > doc/offline/flutter.xml
mv
flutter.docset.tar.gz doc/offline/flutter.docset.tar.gz
# fi
du
-sh
doc/offline/flutter.docset.tar.gz
# mv flutter.docset.tar.gz doc/offline/flutter.docset.tar.gz
# du -sh doc/offline/flutter.docset.tar.gz
}
}
# So that users can run this script from anywhere and it will work as expected.
# So that users can run this script from anywhere and it will work as expected.
...
@@ -148,8 +135,7 @@ SCRIPT_LOCATION="$(script_location)"
...
@@ -148,8 +135,7 @@ SCRIPT_LOCATION="$(script_location)"
# then this line will need to as well.
# then this line will need to as well.
FLUTTER_ROOT
=
"
$(
dirname
"
$(
dirname
"
$SCRIPT_LOCATION
"
)
"
)
"
FLUTTER_ROOT
=
"
$(
dirname
"
$(
dirname
"
$SCRIPT_LOCATION
"
)
"
)
"
COMMAND
=
"
$1
"
echo
"
$(
date
)
: Running docs.sh"
echo
"
$(
date
)
: Running docs.sh
$COMMAND
"
if
[[
!
-d
"
$FLUTTER_ROOT
"
||
!
-f
"
$FLUTTER_ROOT
/bin/flutter"
]]
;
then
if
[[
!
-d
"
$FLUTTER_ROOT
"
||
!
-f
"
$FLUTTER_ROOT
/bin/flutter"
]]
;
then
>
&2
echo
"Unable to locate the Flutter installation (using FLUTTER_ROOT:
$FLUTTER_ROOT
)"
>
&2
echo
"Unable to locate the Flutter installation (using FLUTTER_ROOT:
$FLUTTER_ROOT
)"
...
@@ -175,22 +161,11 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
...
@@ -175,22 +161,11 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
export
PUB_CACHE
=
"
${
PUB_CACHE
:-
"
$FLUTTER_PUB_CACHE
"
}
"
export
PUB_CACHE
=
"
${
PUB_CACHE
:-
"
$FLUTTER_PUB_CACHE
"
}
"
fi
fi
case
"
$COMMAND
"
in
generate_docs
docs
)
if
[[
-n
"
$CIRRUS_CI
"
&&
-z
"
$CIRRUS_PR
"
]]
;
then
generate_docs
(
cd
"
$FLUTTER_ROOT
/dev/docs"
;
create_offline_zip
)
if
[[
-n
"
$CIRRUS_CI
"
&&
-z
"
$CIRRUS_PR
"
]]
;
then
# TODO(tvolkert): re-enable (https://github.com/flutter/flutter/issues/60646)
(
cd
"
$FLUTTER_ROOT
/dev/docs"
;
create_offline_zip
)
# (cd "$FLUTTER_ROOT/dev/docs"; create_docset)
fi
(
cd
"
$FLUTTER_ROOT
/dev/docs"
;
move_offline_into_place
)
;;
deploy_docs
docset
)
fi
assert_not_in_pr
(
cd
"
$FLUTTER_ROOT
/dev/docs"
;
create_docset
)
;;
deploy
)
assert_not_in_pr
deploy_docs
;;
*
)
>
&2
echo
"Usage:
$0
{docs|docset|deploy}"
exit
1
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment