react/scripts/release/publish-commands/push-git-remote.js
Andrew Clark 1fd205ad2d
Additional release script options for publishing canary versions (#12219)
* Additional release script options for publishing canary versions

- `branch` specifies a branch other than master
- `local` skips pulling from the remote branch and checking CircleCI
- `tag` specifies an npm dist tag other than `latest` or `next`

We may add a higher-level `canary` option in the future.

* Address Brian's feedback:

- Updated description of `local` option
- Throws if the `latest` tag is specified for a prerelease version
2018-02-13 11:44:27 -08:00

18 lines
372 B
JavaScript

#!/usr/bin/env node
'use strict';
const {execUnlessDry, logPromise} = require('../utils');
const push = async ({cwd, dry}) => {
await execUnlessDry('git push', {cwd, dry});
await execUnlessDry('git push --tags', {cwd, dry});
};
module.exports = async params => {
if (params.local) {
return;
}
return logPromise(push(params), 'Pushing to git remote');
};