Skip to content

Commit 9aba8f4

Browse files
author
serdimic
committed
modified version string for GIT
1 parent 2cfbdb3 commit 9aba8f4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/gulp/jsProd.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ var streamqueue = require('streamqueue');
1515
module.exports = function (angus, gulp) {
1616
return function () {
1717

18-
var version = 'version:';
18+
var version = '';
1919
var replaceVersion = 'NO-REPLACE-am3m242scl2of2342mcpm23-'+Math.random();
2020
if(angus.appConfig.replaceWithSvnVersion) {
2121
try{
22+
version += 'version:';
2223
version += child_process.execSync('svnversion',{cwd: angus.appPath}).toString().trim();
2324
} catch (err) {
2425
version += '?';
@@ -29,12 +30,13 @@ module.exports = function (angus, gulp) {
2930
}
3031
if(angus.appConfig.replaceWithGitVersion) {
3132
try{
32-
version += child_process.execFileSync('git',[ "rev-parse", "--short", "HEAD" ],{env: process.env, cwd: angus.appPath}).toString().trim();
33+
//version += child_process.execFileSync('git',[ "rev-parse", "--short", "HEAD" ],{env: process.env, cwd: angus.appPath}).toString().trim();
34+
version += child_process.execSync('echo $(git rev-parse --abbrev-ref HEAD)@$(git rev-parse --short HEAD)...',{env: process.env, cwd: angus.appPath}).toString().trim();
3335
} catch (err) {
3436
console.log(err);
3537
version += '?';
3638
}
37-
version += ' build:'+new Date().toISOString();
39+
version += ' '+new Date().toISOString();
3840
replaceVersion = angus.appConfig.replaceWithGitVersion;
3941
gutil.log(gutil.colors.green('version on GIT: '+version));
4042
}

0 commit comments

Comments
 (0)