Skip to content

Commit

Permalink
Adding logging for updateVars as well as making it possible to be mor…
Browse files Browse the repository at this point in the history
…e specific on the variable path to update
  • Loading branch information
dorgan committed Apr 30, 2016
1 parent c7f5964 commit 811772f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tasks/grunt-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,20 @@ module.exports = function(grunt) {

function bump() {
var i, file, pkg, promise, variable,
promises = [];
promises = [], configProp, fullProp;

if (config.vars.length > 0) {
for (i = 0; i < config.vars.length; i++) {
variable = config.vars[i];
grunt.config(variable + '.version', config.newVersion);
configProp = grunt.config(variable);
if (typeof configProp === 'object') {
fullProp = variable + '.version';
grunt.config(fullProp, config.newVersion);
} else if (typeof configProp === 'string') {
fullProp = configProp;
grunt.config(fullProp, config.newVersion);
}
grunt.log.ok('bumped version of ' + fullProp + ' to ' + config.newVersion);
}
}

Expand Down

0 comments on commit 811772f

Please sign in to comment.