0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-10-12 11:02:30 +02:00

Handle multiple tags in buildinfo

This commit is contained in:
peteruithoven 2016-06-15 14:50:09 +02:00
parent 28808078ad
commit 058fff8b34

View File

@ -22,10 +22,11 @@ module.exports = function(grunt) {
var gi = grunt.config('gitinfo');
var lbc = gi.local.branch.current;
var tag = (gi.tag == '') ? 'no_tag' : gi.tag;
var tags = (gi.tag == '') ? 'no_tag' : gi.tag;
tags = tags.split('\n').join(',');
var commitMsg = lbc.lastCommitMessage.slice(1, -1).split('\n')[0].replace(/"/g, '\\\"');
var buildInfo = lbc.shortSHA + "/" + lbc.name + "/" + tag +
var buildInfo = lbc.shortSHA + "/" + lbc.name + "/" + tags +
" (" + lbc.lastCommitTime.slice(1, -1) + "; \'" + commitMsg + "'";
return { 'build_info': buildInfo };
}