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
68221a80
Commit
68221a80
authored
Feb 10, 2017
by
Jason Simmons
Committed by
GitHub
Feb 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a timestamp and Git commit to the dartdoc home page (#8046)
Fixes
https://github.com/flutter/flutter/issues/7974
parent
5caeb3ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
dartdoc.dart
dev/tools/dartdoc.dart
+16
-0
pubspec.yaml
dev/tools/pubspec.yaml
+1
-0
No files found.
dev/tools/dartdoc.dart
View file @
68221a80
...
...
@@ -6,6 +6,7 @@ import 'dart:async';
import
'dart:convert'
;
import
'dart:io'
;
import
'package:intl/intl.dart'
;
import
'package:path/path.dart'
as
path
;
const
String
kDocRoot
=
'dev/docs/doc'
;
...
...
@@ -61,11 +62,14 @@ dependencies:
if
(
code
!=
0
)
exit
(
code
);
createFooter
(
'dev/docs/lib/footer.html'
);
// Generate the documentation.
List
<
String
>
args
=
<
String
>[
'global'
,
'run'
,
'dartdoc'
,
'--header'
,
'styles.html'
,
'--header'
,
'analytics.html'
,
'--footer'
,
'lib/footer.html'
,
'--exclude'
,
'temp_doc'
,
'--favicon=favicon.ico'
,
'--use-categories'
...
...
@@ -90,6 +94,18 @@ dependencies:
createIndexAndCleanup
();
}
void
createFooter
(
String
footerPath
)
{
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'rev-parse'
,
'HEAD'
]);
String
gitHead
=
(
gitResult
.
exitCode
==
0
)
?
gitResult
.
stdout
.
trim
()
:
'unknown'
;
String
timestamp
=
new
DateFormat
(
'yyyy-MM-dd HH:mm'
).
format
(
new
DateTime
.
now
());
new
File
(
footerPath
).
writeAsStringSync
(
'<p class="text-center" style="font-size: 10px">'
'Generated on
$timestamp
- Version
$gitHead
</p>'
);
}
void
sanityCheckDocs
(
)
{
List
<
String
>
canaries
=
<
String
>[
'
$kDocRoot
/api/dart-io/File-class.html'
,
...
...
dev/tools/pubspec.yaml
View file @
68221a80
...
...
@@ -5,4 +5,5 @@ dependencies:
archive
:
^1.0.20
args
:
^0.13.4
http
:
^0.11.3
intl
:
^0.14.0
path
:
^1.4.0
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