Skip to content

Commit 21f226c

Browse files
committed
Revert "Revert "Merge pull request #154 from geddski/logging-updateVars""
This reverts commit 4073980.
1 parent 4073980 commit 21f226c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tasks/grunt-release.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,20 @@ module.exports = function(grunt) {
215215

216216
function bump() {
217217
var i, file, pkg, promise, variable,
218-
promises = [];
218+
promises = [], configProp, fullProp;
219219

220220
if (config.vars.length > 0) {
221221
for (i = 0; i < config.vars.length; i++) {
222222
variable = config.vars[i];
223-
grunt.config(variable + '.version', config.newVersion);
223+
configProp = grunt.config(variable);
224+
if (typeof configProp === 'object') {
225+
fullProp = variable + '.version';
226+
grunt.config(fullProp, config.newVersion);
227+
} else if (typeof configProp === 'string') {
228+
fullProp = configProp;
229+
grunt.config(fullProp, config.newVersion);
230+
}
231+
grunt.log.ok('bumped version of ' + fullProp + ' to ' + config.newVersion);
224232
}
225233
}
226234

0 commit comments

Comments
 (0)