forked from react/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.js
More file actions
executable file
·37 lines (31 loc) · 1.36 KB
/
Copy pathpublish.js
File metadata and controls
executable file
·37 lines (31 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env node
'use strict';
const {join} = require('path');
const {getPublicPackages, handleError} = require('./utils');
const checkNPMPermissions = require('./publish-commands/check-npm-permissions');
const confirmVersionAndTags = require('./publish-commands/confirm-version-and-tags');
const downloadErrorCodesFromCI = require('./publish-commands/download-error-codes-from-ci');
const parseParams = require('./publish-commands/parse-params');
const printFollowUpInstructions = require('./publish-commands/print-follow-up-instructions');
const promptForOTP = require('./publish-commands/prompt-for-otp');
const publishToNPM = require('./publish-commands/publish-to-npm');
const updateStableVersionNumbers = require('./publish-commands/update-stable-version-numbers');
const validateTags = require('./publish-commands/validate-tags');
const run = async () => {
try {
const params = parseParams();
params.cwd = join(__dirname, '..', '..');
params.packages = await getPublicPackages();
await validateTags(params);
await confirmVersionAndTags(params);
await checkNPMPermissions(params);
const otp = await promptForOTP(params);
await publishToNPM(params, otp);
await downloadErrorCodesFromCI(params);
await updateStableVersionNumbers(params);
await printFollowUpInstructions(params);
} catch (error) {
handleError(error);
}
};
run();