Skip to content

Commit 8a3f1d0

Browse files
committed
Fixing grunt bumping before building shenanigans
1 parent 86a813c commit 8a3f1d0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Gruntfile.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,14 @@ module.exports = function(grunt) {
8282
grunt.loadNpmTasks('grunt-bumpup');
8383
grunt.loadNpmTasks('grunt-gcc');
8484

85+
// Task for updating the pkg config property. Needs to be run after
86+
// bumpup so the next tasks in queue can work with updated values.
87+
grunt.registerTask('updatePkg', function () {
88+
grunt.config.set('pkg', grunt.file.readJSON('component.json'));
89+
});
90+
8591
// Build task.
8692
grunt.registerTask('build', function () {
87-
grunt.task.run('jshint');
8893
grunt.task.run('clean');
8994
grunt.task.run('concat');
9095
grunt.task.run('gcc');
@@ -93,8 +98,10 @@ module.exports = function(grunt) {
9398
// Release task.
9499
grunt.registerTask('release', function (type) {
95100
type = type ? type : 'patch';
96-
grunt.task.run('build');
101+
grunt.task.run('jshint');
97102
grunt.task.run('bumpup:' + type);
103+
grunt.task.run('updatePkg');
104+
grunt.task.run('build');
98105
grunt.task.run('tagrelease');
99106
});
100107

0 commit comments

Comments
 (0)