Skip to content

Commit 3858b07

Browse files
committed
build: Reduce publishing to just one step
1 parent aa94a44 commit 3858b07

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

scripts/deploy.js

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,14 @@ process.on('unhandledRejection', reason => console.log(reason));
104104

105105
if (shouldPushChanges) pushChanges();
106106

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?`,
110110
type: 'confirm',
111111
default: false
112112
});
113113

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();
124115

125116
await askUnskippableQuestion(
126117
`Sweet! Now go to https://github.com/getsentry/raven-js/releases and copy a changelog in there`
@@ -226,12 +217,7 @@ function pushChanges() {
226217
console.log('✔ Changes pushed');
227218
}
228219

229-
function publishOnCdn() {
230-
execCommand(`grunt publish`);
231-
console.log('✔ Published on CDN');
232-
}
233-
234-
function publishOnNpm() {
220+
function publish() {
235221
execCommand(`npm publish`);
236-
console.log('✔ Published on NPM');
222+
console.log('✔ Published on CDN and NPM');
237223
}

0 commit comments

Comments
 (0)