@@ -104,23 +104,14 @@ process.on('unhandledRejection', reason => console.log(reason));
104
104
105
105
if ( shouldPushChanges ) pushChanges ( ) ;
106
106
107
- const { shouldPublishOnCdn } = await inquirer . prompt ( {
108
- name : 'shouldPublishOnCdn ' ,
109
- message : `Do you want to publish on CDN?` ,
107
+ const { shouldPublish } = await inquirer . prompt ( {
108
+ name : 'shouldPublish ' ,
109
+ message : `Do you want to publish on CDN and NPM ?` ,
110
110
type : 'confirm' ,
111
111
default : false
112
112
} ) ;
113
113
114
- if ( shouldPublishOnCdn ) publishOnCdn ( ) ;
115
-
116
- const { shouldPublishOnNpm} = await inquirer . prompt ( {
117
- name : 'shouldPublishOnNpm' ,
118
- message : `Do you want to publish on NPM?` ,
119
- type : 'confirm' ,
120
- default : false
121
- } ) ;
122
-
123
- if ( shouldPublishOnNpm ) publishOnNpm ( ) ;
114
+ if ( shouldPublish ) publish ( ) ;
124
115
125
116
await askUnskippableQuestion (
126
117
`Sweet! Now go to https://github.com/getsentry/raven-js/releases and copy a changelog in there`
@@ -226,12 +217,7 @@ function pushChanges() {
226
217
console . log ( '✔ Changes pushed' ) ;
227
218
}
228
219
229
- function publishOnCdn ( ) {
230
- execCommand ( `grunt publish` ) ;
231
- console . log ( '✔ Published on CDN' ) ;
232
- }
233
-
234
- function publishOnNpm ( ) {
220
+ function publish ( ) {
235
221
execCommand ( `npm publish` ) ;
236
- console . log ( '✔ Published on NPM' ) ;
222
+ console . log ( '✔ Published on CDN and NPM' ) ;
237
223
}
0 commit comments