Skip to content

Commit 058fff8

Browse files
committed
Handle multiple tags in buildinfo
1 parent 2880807 commit 058fff8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Gruntfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ module.exports = function(grunt) {
2222
var gi = grunt.config('gitinfo');
2323
var lbc = gi.local.branch.current;
2424

25-
var tag = (gi.tag == '') ? 'no_tag' : gi.tag;
25+
var tags = (gi.tag == '') ? 'no_tag' : gi.tag;
26+
tags = tags.split('\n').join(',');
2627
var commitMsg = lbc.lastCommitMessage.slice(1, -1).split('\n')[0].replace(/"/g, '\\\"');
2728

28-
var buildInfo = lbc.shortSHA + "/" + lbc.name + "/" + tag +
29+
var buildInfo = lbc.shortSHA + "/" + lbc.name + "/" + tags +
2930
" (" + lbc.lastCommitTime.slice(1, -1) + "; \'" + commitMsg + "'";
3031
return { 'build_info': buildInfo };
3132
}

0 commit comments

Comments
 (0)