react/scripts/release/ci-update-package-versions.js
Brian Vaughn 9e158c091b
Updated release script documentation and command names (#17929)
* Updated release script documentation and command names

* Update scripts/release/README.md

Co-Authored-By: Sunil Pai <threepointone@oculus.com>

* Updated README

Co-authored-by: Sunil Pai <threepointone@oculus.com>
2020-02-05 08:52:31 -08:00

32 lines
886 B
JavaScript
Executable File

#!/usr/bin/env node
'use strict';
// This script is run by Circle CI (see ../scripts/circleci).
// It is not meant to be run as part of the local build or publish process.
// It exists to share code between the Node release scripts and CI bash scripts.
const {exec} = require('child_process');
const {join} = require('path');
const run = async () => {
const {getBuildInfo, updateVersionsForNext} = require('./utils');
const cwd = join(__dirname, '..', '..');
const {reactVersion, version} = await getBuildInfo();
await updateVersionsForNext(cwd, reactVersion, version);
};
// Install (or update) release script dependencies before proceeding.
// This needs to be done before we require() the first NPM module.
exec('yarn install', {cwd: __dirname}, (error, stdout, stderr) => {
if (error) {
console.error(error);
process.exit(1);
} else {
run();
}
});