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
1e6c7eb9
Commit
1e6c7eb9
authored
May 11, 2017
by
Ian Hickson
Committed by
GitHub
May 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make docs.sh resilient to not having dart in the path (#9981)
parent
bc32847f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
docs.sh
dev/bots/docs.sh
+7
-4
dartdoc.dart
dev/tools/dartdoc.dart
+20
-6
No files found.
dev/bots/docs.sh
View file @
1e6c7eb9
...
...
@@ -4,14 +4,17 @@ set -e
# If you want to run this script locally, make sure you run it from
# the root of the flutter repository.
# Make sure dart is installed
bin/flutter
--version
# Install dartdoc.
pub global activate dartdoc 0.11.1
bin/cache/dart-sdk/bin/
pub global activate dartdoc 0.11.1
# This script generates a unified doc set, and creates
# a custom index.html, placing everything into dev/docs/doc.
(
cd
dev/tools
;
pub get
)
FLUTTER_ROOT
=
$PWD
dart dev/tools/dartdoc.dart
FLUTTER_ROOT
=
$PWD
dart dev/tools/javadoc.dart
(
cd
dev/tools
;
../../bin/cache/dart-sdk/bin/
pub get
)
FLUTTER_ROOT
=
$PWD
bin/cache/dart-sdk/bin/
dart dev/tools/dartdoc.dart
FLUTTER_ROOT
=
$PWD
bin/cache/dart-sdk/bin/
dart dev/tools/javadoc.dart
# Ensure google webmaster tools can verify our site.
cp
dev/docs/google2ed1af765c529f57.html dev/docs/doc
...
...
dev/tools/dartdoc.dart
View file @
1e6c7eb9
...
...
@@ -19,6 +19,11 @@ const String kDocRoot = 'dev/docs/doc';
/// at the root of docs.flutter.io. We are keeping the files inside of
/// docs.flutter.io/flutter for now, so we need to manipulate paths
/// a bit. See https://github.com/flutter/flutter/issues/3900 for more info.
///
/// This will only work on UNIX systems, not Windows. It requires that 'git' be
/// in your path. It requires that 'flutter' has been run previously. It uses
/// the version of Dart downloaded by the 'flutter' tool in this repository and
/// will crash if that is absent.
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
// If we're run from the `tools` dir, set the cwd to the repo root.
if
(
path
.
basename
(
Directory
.
current
.
path
)
==
'tools'
)
...
...
@@ -50,11 +55,13 @@ dependencies:
new
File
(
'dev/docs/lib/temp_doc.dart'
).
writeAsStringSync
(
contents
.
toString
());
// Run pub.
Process
process
=
await
Process
.
start
(
'pub'
,
<
String
>[
'get'
],
Process
process
=
await
Process
.
start
(
'../../bin/cache/dart-sdk/bin/pub'
,
<
String
>[
'get'
],
workingDirectory:
'dev/docs'
,
environment:
<
String
,
String
>{
'FLUTTER_ROOT'
:
Directory
.
current
.
path
}
'FLUTTER_ROOT'
:
Directory
.
current
.
path
,
}
,
);
printStream
(
process
.
stdout
);
printStream
(
process
.
stderr
);
...
...
@@ -65,8 +72,11 @@ dependencies:
createFooter
(
'dev/docs/lib/footer.html'
);
// Verify which version of dartdoc we're using.
final
ProcessResult
result
=
Process
.
runSync
(
'pub'
,
<
String
>[
'global'
,
'run'
,
'dartdoc'
,
'--version'
]);
final
ProcessResult
result
=
Process
.
runSync
(
'../../bin/cache/dart-sdk/bin/pub'
,
<
String
>[
'global'
,
'run'
,
'dartdoc'
,
'--version'
],
workingDirectory:
'dev/docs'
,
);
print
(
'
\n
${result.stdout}
'
);
// Generate the documentation.
...
...
@@ -87,7 +97,11 @@ dependencies:
args
.
add
(
libraryRef
);
}
process
=
await
Process
.
start
(
'pub'
,
args
,
workingDirectory:
'dev/docs'
);
process
=
await
Process
.
start
(
'../../bin/cache/dart-sdk/bin/pub'
,
args
,
workingDirectory:
'dev/docs'
,
);
printStream
(
process
.
stdout
);
printStream
(
process
.
stderr
);
final
int
exitCode
=
await
process
.
exitCode
;
...
...
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