@@ -24,28 +24,33 @@ if (!readlineSync.keyInYN('Did you push all changes back to origin?')) {
2424 process . exit ( 1 ) ;
2525}
2626
27+ if ( ! readlineSync . keyInYN ( 'Ready to publish?' ) ) {
28+ process . exit ( 1 ) ;
29+ }
30+
2731util . ensureCleanMaster ( 'master' ) ;
2832
2933_exec ( 'npm run package' ) ;
3034_exec ( `npm run docs` ) ;
3135
3236console . log ( 'Updating version in bower.json to ${version}' ) ;
3337
34- let bowerJson = JSON . parse ( fs . readFileSync ( BOWER_JSON , 'UTF-8' ) ) ;
38+ let bowerJson = JSON . parse ( fs . readFileSync ( 'bower.json' , 'UTF-8' ) ) ;
3539bowerJson . version = version ;
36- fs . writeFileSync ( BOWER_JSON , asJson ( bowerJson ) ) ;
37- _exec ( `git commit -m "Release ${ version } "` ) ;
40+ fs . writeFileSync ( 'bower.json' , JSON . stringify ( bowerJson ) ) ;
41+ _exec ( `git commit -m "Release ${ version } " bower.json ` ) ;
3842
3943util . ensureCleanMaster ( 'master' ) ;
4044
4145// publish to npm first
4246_exec ( `npm publish` ) ;
4347
44- // then branch, add/commit release files, tag, and push
48+ // then tag and push tag
4549_exec ( `git tag ${ version } ` ) ;
4650_exec ( `git push` ) ;
4751_exec ( `git push origin ${ version } ` ) ;
4852
53+ // branch, add/commit release files, and push to bower repository
4954_exec ( `git checkout -b bower-${ version } ` ) ;
5055_exec ( `git add --force release` ) ;
5156_exec ( `git commit -m "bower release ${ version } "` ) ;
0 commit comments