Display the most recent commit SHA on the about page
Change-Id: Idca471882a6b06df5d840649efabcf3a6696b5d6
This commit is contained in:
parent
03fe1737e9
commit
d0fea306cc
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,4 +11,5 @@ cover
|
||||
.tox
|
||||
src/theme/custom/**.less
|
||||
src/theme/custom/**.ico
|
||||
src/config.json
|
||||
src/config.json
|
||||
src/app/pages/template/about.html
|
||||
|
39
Gruntfile.js
39
Gruntfile.js
@ -114,6 +114,37 @@ module.exports = function (grunt) {
|
||||
]
|
||||
},
|
||||
|
||||
/**
|
||||
* grunt gitinfo
|
||||
*
|
||||
* Gets information about the current state of the source repository.
|
||||
*/
|
||||
gitinfo: {
|
||||
options: {
|
||||
cwd: '.'
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* grunt template
|
||||
*
|
||||
* Interpolate variables into any templates we have defined.
|
||||
*/
|
||||
template: {
|
||||
'process-html-template': {
|
||||
options: {
|
||||
data: {
|
||||
sha: '<%= gitinfo.local.branch.current.SHA %>'
|
||||
}
|
||||
},
|
||||
files: {
|
||||
'src/app/pages/template/about.html': [
|
||||
'src/app/pages/template/about.html.tpl'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* grunt concat
|
||||
*
|
||||
@ -417,6 +448,12 @@ module.exports = function (grunt) {
|
||||
* when necessary.
|
||||
*/
|
||||
watch: {
|
||||
template: {
|
||||
files: [
|
||||
dir.source + '/**/*.tpl'
|
||||
],
|
||||
tasks: ['compile']
|
||||
},
|
||||
concat: {
|
||||
files: [
|
||||
dir.source + '/app/**/module.js',
|
||||
@ -571,6 +608,8 @@ module.exports = function (grunt) {
|
||||
* Compiles all of our sources.
|
||||
*/
|
||||
grunt.registerTask('compile', [
|
||||
'gitinfo',
|
||||
'template',
|
||||
'useminPrepare',
|
||||
'concat',
|
||||
'less',
|
||||
|
@ -43,11 +43,13 @@
|
||||
"grunt-contrib-watch": "0.6.1",
|
||||
"grunt-env": "0.4.1",
|
||||
"grunt-eslint": "7.0.1",
|
||||
"grunt-gitinfo": "^0.1.7",
|
||||
"grunt-html2js": "0.2.9",
|
||||
"grunt-karma": "0.9.0",
|
||||
"grunt-open": "0.2.3",
|
||||
"grunt-protractor-runner": "1.1.4",
|
||||
"grunt-shell": "1.1.1",
|
||||
"grunt-template": "^0.2.3",
|
||||
"grunt-usemin": "2.4.0",
|
||||
"grunt-webfont": "0.4.8",
|
||||
"karma": "0.12.23",
|
||||
|
@ -58,12 +58,13 @@
|
||||
is not well served. This system uses the best concepts
|
||||
from existing tools and goes beyond to support the needs
|
||||
of the OpenStack project.</p>
|
||||
<p><a href="http://git.openstack.org/cgit/openstack-infra/storyboard/tree/README.rst"
|
||||
<p><a href="http://git.openstack.org/cgit/openstack-infra/storyboard/tree/README.rst"
|
||||
target="_blank"
|
||||
class="btn btn-primary">
|
||||
See project README
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
</a>
|
||||
</a></p>
|
||||
<small><p class="text-muted">Webclient version: <%- sha %></p></small>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<hr class="visible-xs"/>
|
Loading…
Reference in New Issue
Block a user