diff --git a/gulpfile.js b/gulpfile.js index ff82324558..1df3d2ebb7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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)); }); diff --git a/package.json b/package.json index af5fe25ba4..793aa31ab5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/platform/core/bundle.js b/platform/core/bundle.js index f1c93405fc..a2a3842476 100644 --- a/platform/core/bundle.js +++ b/platform/core/bundle.js @@ -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 } ],