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
328c73e6
Unverified
Commit
328c73e6
authored
Feb 04, 2019
by
Janice Collins
Committed by
GitHub
Feb 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dartdoc to 0.28.1+1 and add parameters for source-code linking (#27511)
parent
f026b193
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
docs.sh
dev/bots/docs.sh
+1
-1
dartdoc.dart
dev/tools/dartdoc.dart
+11
-7
No files found.
dev/bots/docs.sh
View file @
328c73e6
...
@@ -104,7 +104,7 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
...
@@ -104,7 +104,7 @@ if [[ -d "$FLUTTER_PUB_CACHE" ]]; then
fi
fi
# Install and activate dartdoc.
# Install and activate dartdoc.
"
$PUB
"
global activate dartdoc 0.28.
0
"
$PUB
"
global activate dartdoc 0.28.
1+1
# This script generates a unified doc set, and creates
# This script generates a unified doc set, and creates
# a custom index.html, placing everything into dev/docs/doc.
# a custom index.html, placing everything into dev/docs/doc.
...
...
dev/tools/dartdoc.dart
View file @
328c73e6
...
@@ -126,6 +126,9 @@ Future<void> main(List<String> arguments) async {
...
@@ -126,6 +126,9 @@ Future<void> main(List<String> arguments) async {
}
else
{
}
else
{
dartdocBaseArgs
.
add
(
'--no-validate-links'
);
dartdocBaseArgs
.
add
(
'--no-validate-links'
);
}
}
dartdocBaseArgs
.
addAll
(<
String
>[
'--link-to-source-excludes'
,
'../../bin/cache'
,
'--link-to-source-root'
,
'../..'
,
'--link-to-source-uri-template'
,
'https://github.com/flutter/flutter/blob/
${gitRevision()}
/%f%#L%l%'
]);
// Generate the documentation.
// Generate the documentation.
// We don't need to exclude flutter_tools in this list because it's not in the
// We don't need to exclude flutter_tools in this list because it's not in the
// recursive dependencies of the package defined at dev/docs/pubspec.yaml
// recursive dependencies of the package defined at dev/docs/pubspec.yaml
...
@@ -250,24 +253,25 @@ String getBranchName() {
...
@@ -250,24 +253,25 @@ String getBranchName() {
return
gitBranchMatch
==
null
?
''
:
gitBranchMatch
.
group
(
1
).
split
(
'...'
).
first
;
return
gitBranchMatch
==
null
?
''
:
gitBranchMatch
.
group
(
1
).
split
(
'...'
).
first
;
}
}
void
createFooter
(
String
footerPath
)
{
String
gitRevision
(
)
{
const
int
kGitRevisionLength
=
10
;
const
int
kGitRevisionLength
=
10
;
final
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'rev-parse'
,
'HEAD'
]);
final
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'rev-parse'
,
'HEAD'
]);
if
(
gitResult
.
exitCode
!=
0
)
if
(
gitResult
.
exitCode
!=
0
)
throw
'git rev-parse exit with non-zero exit code:
${gitResult.exitCode}
'
;
throw
'git rev-parse exit with non-zero exit code:
${gitResult.exitCode}
'
;
String
gitRevision
=
gitResult
.
stdout
.
trim
();
final
String
gitRevision
=
gitResult
.
stdout
.
trim
();
final
String
gitBranch
=
getBranchName
();
final
String
gitBranchOut
=
gitBranch
.
isEmpty
?
''
:
'• </span class="no-break">
$gitBranch
</span>'
;
gitRevision
=
gitRevision
.
length
>
kGitRevisionLength
?
gitRevision
.
substring
(
0
,
kGitRevisionLength
)
:
gitRevision
;
return
gitRevision
.
length
>
kGitRevisionLength
?
gitRevision
.
substring
(
0
,
kGitRevisionLength
)
:
gitRevision
;
}
void
createFooter
(
String
footerPath
)
{
final
String
timestamp
=
DateFormat
(
'yyyy-MM-dd HH:mm'
).
format
(
DateTime
.
now
());
final
String
timestamp
=
DateFormat
(
'yyyy-MM-dd HH:mm'
).
format
(
DateTime
.
now
());
final
String
gitBranch
=
getBranchName
();
final
String
gitBranchOut
=
gitBranch
.
isEmpty
?
''
:
'• </span class="no-break">
$gitBranch
</span>'
;
File
(
footerPath
).
writeAsStringSync
(<
String
>[
File
(
footerPath
).
writeAsStringSync
(<
String
>[
'• </span class="no-break">
$timestamp
<span>'
,
'• </span class="no-break">
$timestamp
<span>'
,
'• </span class="no-break">
$
gitRevision
</span>'
,
'• </span class="no-break">
$
{gitRevision()}
</span>'
,
gitBranchOut
].
join
(
' '
));
gitBranchOut
].
join
(
' '
));
}
}
...
...
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