File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -82,9 +82,14 @@ module.exports = function(grunt) {
82
82
grunt . loadNpmTasks ( 'grunt-bumpup' ) ;
83
83
grunt . loadNpmTasks ( 'grunt-gcc' ) ;
84
84
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
+
85
91
// Build task.
86
92
grunt . registerTask ( 'build' , function ( ) {
87
- grunt . task . run ( 'jshint' ) ;
88
93
grunt . task . run ( 'clean' ) ;
89
94
grunt . task . run ( 'concat' ) ;
90
95
grunt . task . run ( 'gcc' ) ;
@@ -93,8 +98,10 @@ module.exports = function(grunt) {
93
98
// Release task.
94
99
grunt . registerTask ( 'release' , function ( type ) {
95
100
type = type ? type : 'patch' ;
96
- grunt . task . run ( 'build ' ) ;
101
+ grunt . task . run ( 'jshint ' ) ;
97
102
grunt . task . run ( 'bumpup:' + type ) ;
103
+ grunt . task . run ( 'updatePkg' ) ;
104
+ grunt . task . run ( 'build' ) ;
98
105
grunt . task . run ( 'tagrelease' ) ;
99
106
} ) ;
100
107
You can’t perform that action at this time.
0 commit comments