Skip to content

Commit

Permalink
Release script filters DevTools NPM pakcages (#16810)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Sep 17, 2019
1 parent 8f1533f commit e8c7dde
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/release/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const createLogger = require('progress-estimator');
const prompt = require('prompt-promise');
const theme = require('./theme');

// The following packages are published to NPM but not by this script.
// They are released through a separate process.
const RELEASE_SCRIPT_PACKAGE_SKIPLIST = [
'react-devtools',
'react-devtools-core',
'react-devtools-inline',
];

// https://www.npmjs.com/package/progress-estimator#configuration
const logger = createLogger({
storagePath: join(__dirname, '.progress-estimator'),
Expand Down Expand Up @@ -49,8 +57,7 @@ const getArtifactsList = async buildID => {
process.env.CIRCLE_CI_API_TOKEN
}`;
const workflowMetadata = await http.get(workflowMetadataURL, true);

const job = workflowMetadata.jobs.find(
const job = workflowMetadata.items.find(
({name}) => name === 'process_artifacts'
);
if (!job || !job.job_number) {
Expand Down Expand Up @@ -105,6 +112,10 @@ const getPublicPackages = () => {
const packagesRoot = join(__dirname, '..', '..', 'packages');

return readdirSync(packagesRoot).filter(dir => {
if (RELEASE_SCRIPT_PACKAGE_SKIPLIST.includes(dir)) {
return false;
}

const packagePath = join(packagesRoot, dir, 'package.json');

if (dir.charAt(0) !== '.' && statSync(packagePath).isFile()) {
Expand Down

0 comments on commit e8c7dde

Please sign in to comment.