Display the most recent commit SHA on the about page
Change-Id: Idca471882a6b06df5d840649efabcf3a6696b5d6
This commit is contained in:
parent
03fe1737e9
commit
d0fea306cc
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ cover
|
|||||||
src/theme/custom/**.less
|
src/theme/custom/**.less
|
||||||
src/theme/custom/**.ico
|
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
|
* grunt concat
|
||||||
*
|
*
|
||||||
@ -417,6 +448,12 @@ module.exports = function (grunt) {
|
|||||||
* when necessary.
|
* when necessary.
|
||||||
*/
|
*/
|
||||||
watch: {
|
watch: {
|
||||||
|
template: {
|
||||||
|
files: [
|
||||||
|
dir.source + '/**/*.tpl'
|
||||||
|
],
|
||||||
|
tasks: ['compile']
|
||||||
|
},
|
||||||
concat: {
|
concat: {
|
||||||
files: [
|
files: [
|
||||||
dir.source + '/app/**/module.js',
|
dir.source + '/app/**/module.js',
|
||||||
@ -571,6 +608,8 @@ module.exports = function (grunt) {
|
|||||||
* Compiles all of our sources.
|
* Compiles all of our sources.
|
||||||
*/
|
*/
|
||||||
grunt.registerTask('compile', [
|
grunt.registerTask('compile', [
|
||||||
|
'gitinfo',
|
||||||
|
'template',
|
||||||
'useminPrepare',
|
'useminPrepare',
|
||||||
'concat',
|
'concat',
|
||||||
'less',
|
'less',
|
||||||
|
@ -43,11 +43,13 @@
|
|||||||
"grunt-contrib-watch": "0.6.1",
|
"grunt-contrib-watch": "0.6.1",
|
||||||
"grunt-env": "0.4.1",
|
"grunt-env": "0.4.1",
|
||||||
"grunt-eslint": "7.0.1",
|
"grunt-eslint": "7.0.1",
|
||||||
|
"grunt-gitinfo": "^0.1.7",
|
||||||
"grunt-html2js": "0.2.9",
|
"grunt-html2js": "0.2.9",
|
||||||
"grunt-karma": "0.9.0",
|
"grunt-karma": "0.9.0",
|
||||||
"grunt-open": "0.2.3",
|
"grunt-open": "0.2.3",
|
||||||
"grunt-protractor-runner": "1.1.4",
|
"grunt-protractor-runner": "1.1.4",
|
||||||
"grunt-shell": "1.1.1",
|
"grunt-shell": "1.1.1",
|
||||||
|
"grunt-template": "^0.2.3",
|
||||||
"grunt-usemin": "2.4.0",
|
"grunt-usemin": "2.4.0",
|
||||||
"grunt-webfont": "0.4.8",
|
"grunt-webfont": "0.4.8",
|
||||||
"karma": "0.12.23",
|
"karma": "0.12.23",
|
||||||
|
@ -58,12 +58,13 @@
|
|||||||
is not well served. This system uses the best concepts
|
is not well served. This system uses the best concepts
|
||||||
from existing tools and goes beyond to support the needs
|
from existing tools and goes beyond to support the needs
|
||||||
of the OpenStack project.</p>
|
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"
|
target="_blank"
|
||||||
class="btn btn-primary">
|
class="btn btn-primary">
|
||||||
See project README
|
See project README
|
||||||
<i class="fa fa-chevron-right"></i>
|
<i class="fa fa-chevron-right"></i>
|
||||||
</a>
|
</a></p>
|
||||||
|
<small><p class="text-muted">Webclient version: <%- sha %></p></small>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<hr class="visible-xs"/>
|
<hr class="visible-xs"/>
|
Loading…
x
Reference in New Issue
Block a user