[Build] Begin adding build info

This commit is contained in:
Victor Woeltjen 2016-01-28 17:08:02 -08:00
parent 5b0ee8588c
commit c3f819fa8c
3 changed files with 16 additions and 5 deletions

View File

@ -27,6 +27,7 @@ var gulp = require('gulp'),
compass = require('gulp-compass'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
replace = require('gulp-replace-task'),
karma = require('karma'),
path = require('path'),
paths = {
@ -55,6 +56,14 @@ var gulp = require('gulp'),
compass: {
sass: __dirname,
css: paths.assets
},
replace: {
variables: {
version: "unknown version",
timestamp: "unknown timestamp",
revision: "unknown revision",
branch: "unknown branch"
}
}
};
@ -63,6 +72,7 @@ gulp.task('scripts', function () {
.pipe(sourcemaps.init())
.pipe(requirejsOptimize(options.requirejsOptimize))
.pipe(sourcemaps.write('.'))
.pipe(replace(options.replace))
.pipe(gulp.dest(paths.dist));
});

View File

@ -12,6 +12,7 @@
"gulp-compass": "^2.1.0",
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",
"gulp-replace-task": "^0.11.0",
"gulp-requirejs-optimize": "^0.3.1",
"gulp-sourcemaps": "^1.6.0",
"jasmine-core": "^2.3.0",

View File

@ -99,25 +99,25 @@ define([
"versions": [
{
"name": "Version",
"value": "${project.version}",
"value": "@@version",
"priority": 999
},
{
"name": "Built",
"value": "${timestamp}",
"value": "@@timestamp",
"description": "The date on which this version of the client was built.",
"priority": 990
},
{
"name": "Revision",
"value": "${buildNumber}",
"value": "@@revision",
"description": "A unique revision identifier for the client sources.",
"priority": 995
},
{
"name": "Branch",
"value": "${scmBranch}",
"description": "The date on which this version of the client was built.",
"value": "@@branch",
"description": "The name of the branch that was used during the build.",
"priority": 994
}
],