Skip to content

Commit ace863b

Browse files
committed
Merge pull request #394 from stephenplusplus/spp--gh-pages-timestamp
add last built timestamp to master docs - fixes #385
2 parents e8b17a2 + 16123dc commit ace863b

File tree

5 files changed

+40
-0
lines changed

5 files changed

+40
-0
lines changed

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<script src="//cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
3131
<script src="site/lib/node-semver/semver.browser.js"></script>
3232
<script src="site/lib/angular-markdown-directive/markdown.js"></script>
33+
<script src="site/lib/momentjs/moment.min.js"></script>
3334
<script src="site/home.js"></script>
3435
<script src="site/components/docs/docs.js"></script>
3536
<script src="site/components/docs/docs-directives.js"></script>

docs/site/components/docs/docs.html

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
links="{{links}}"
2424
header-templateUrl="docs-header.html"
2525
is-active-url="isActiveUrl">
26+
2627
<article ng-show="showReference">
2728
<h3 class="sub-heading">
2829
<div class="toggler" ng-click="showGcloudDocs = !showGcloudDocs">
@@ -133,6 +134,8 @@ <h4>ACLs</h4>
133134
</p>
134135
</article>
135136

137+
<em ng-if="lastBuiltDate">Docs last built {{lastBuiltDate}}.</em>
138+
136139
<article
137140
ng-repeat="method in methods"
138141
ng-hide="singleMethod && method.name !== singleMethod">

docs/site/components/docs/docs.js

+7
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,13 @@ angular
322322
return doc.toLowerCase() === $routeParams.module;
323323
};
324324

325+
if ($routeParams.version === 'master') {
326+
$http.get('https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/commits?sha=gh-pages&per_page=1')
327+
.then(function(resp) {
328+
$scope.lastBuiltDate = moment(resp.data[0].commit.committer.date).format('MMMM Do, YYYY');
329+
});
330+
}
331+
325332
$scope.pageTitle = 'Node.js';
326333
$scope.showReference = true;
327334
$scope.activeUrl = '#' + $location.path();

docs/site/lib/momentjs/LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2011-2014 Tim Wood, Iskren Chernev, Moment.js contributors
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

docs/site/lib/momentjs/moment.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)