@@ -24,28 +24,33 @@ if (!readlineSync.keyInYN('Did you push all changes back to origin?')) {
24
24
process . exit ( 1 ) ;
25
25
}
26
26
27
+ if ( ! readlineSync . keyInYN ( 'Ready to publish?' ) ) {
28
+ process . exit ( 1 ) ;
29
+ }
30
+
27
31
util . ensureCleanMaster ( 'master' ) ;
28
32
29
33
_exec ( 'npm run package' ) ;
30
34
_exec ( `npm run docs` ) ;
31
35
32
36
console . log ( 'Updating version in bower.json to ${version}' ) ;
33
37
34
- let bowerJson = JSON . parse ( fs . readFileSync ( BOWER_JSON , 'UTF-8' ) ) ;
38
+ let bowerJson = JSON . parse ( fs . readFileSync ( 'bower.json' , 'UTF-8' ) ) ;
35
39
bowerJson . 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 ` ) ;
38
42
39
43
util . ensureCleanMaster ( 'master' ) ;
40
44
41
45
// publish to npm first
42
46
_exec ( `npm publish` ) ;
43
47
44
- // then branch, add/commit release files, tag, and push
48
+ // then tag and push tag
45
49
_exec ( `git tag ${ version } ` ) ;
46
50
_exec ( `git push` ) ;
47
51
_exec ( `git push origin ${ version } ` ) ;
48
52
53
+ // branch, add/commit release files, and push to bower repository
49
54
_exec ( `git checkout -b bower-${ version } ` ) ;
50
55
_exec ( `git add --force release` ) ;
51
56
_exec ( `git commit -m "bower release ${ version } "` ) ;
0 commit comments