Compare commits

...

5 Commits

Author SHA1 Message Date
peteruithoven f8032d7411 Merge branch 'develop' 2017-06-23 12:36:16 +02:00
peteruithoven 2acb06c3ed Adding forgotten grunt task to make file: template
@companje This would add build info, create main.js.out which was used in later concat tasks. Without this task the final code would lack the main.js code.
2017-06-23 12:28:35 +02:00
peteruithoven daed62937c Merged master into develop 2016-07-26 15:24:38 +02:00
peteruithoven 058fff8b34 Handle multiple tags in buildinfo 2016-06-15 14:50:09 +02:00
peteruithoven 28808078ad Enable using common npm start script 2016-06-15 14:49:46 +02:00
3 changed files with 8 additions and 4 deletions

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 };
}

View File

@ -48,9 +48,9 @@ define Build/Compile
# grunt can access git info
npm install
ifeq ($(CONFIG_DOODLE3D_CLIENT_MINIFY_JS),y)
grunt gitinfo less autoprefixer cssmin concat uglify
grunt gitinfo template less autoprefixer cssmin concat uglify
else
grunt gitinfo less autoprefixer cssmin concat
grunt gitinfo template less autoprefixer cssmin concat
endif
# Copy compiled files to build dir
$(CP) www $(PKG_BUILD_DIR)/

View File

@ -20,5 +20,8 @@
"grunt-contrib-concat": "~0.3.0",
"grunt-gitinfo": "~0.1.7",
"grunt-template": "~0.2.3"
},
"scripts": {
"start": "grunt"
}
}