Files
react-native-web/scripts/release/publish.js
Nicolas Gallagher 3026465ae3 Monorepo
Introduces a monorepo structure, relies on yarn workspaces to share
dependencies, and lerna for syncing versions across the monorepo.

* Create 2 workspaces:
    'packages' and 'website'
* Create 2 public packages:
    'babel-plugin-react-native-web' and 'react-native-web'
* Create 1 private package:
    'benchmarks'

A simple release script runs the tests, builds the package assets,
increments the package version numbers, git commits and tags, publishes
the package to npm, pushes the changes to github, and releases the
website update.

Close #657
2017-12-24 12:33:41 +00:00

20 lines
557 B
JavaScript

#!/usr/bin/env node
'use strict';
const execSync = require('child_process').execSync;
const version = process.argv.slice(2)[0];
console.log(`Publishing ${version}`);
// use lerna to bump versions and dependencies
execSync(`./node_modules/.bin/lerna publish --skip-git --skip-npm --repo-version ${version} --yes`);
// add changes
execSync('git add .');
// commit and tag
execSync(`git commit -m "${version}" && git tag -m ${version} "${version}"`);
// publish to npm
execSync('yarn publish');
// push to github
execSync('git push --tags origin master');