chore(release): rename release script

This commit is contained in:
Adam Bradley
2018-03-28 16:20:20 -05:00
parent f304480dfc
commit 53b6471d2b
4 changed files with 16 additions and 12 deletions

View File

@@ -1,16 +1,16 @@
# Build Scripts
## Deploy
## Release
The deploy scripts at the root, make a new release of all the packages in this monorepo.
All packages will be released with the same version.
In order to make a new release:
1. `npm run prepare.deploy`
1. `npm run release.prepare`
2. Review/update changelog
3. Commit updates using the package name and version number as the commit message.
4. `npm run deploy`
4. `npm run release`
5. :tada:

View File

@@ -60,22 +60,24 @@ async function publishPackages(packages, version) {
);
});
// push commits and tags to git remote
publishGit(version);
// push tag to git remote
publishGitTag(tasks, version);
const listr = new Listr(tasks);
await listr.run();
}
function publishGit(tasks, version) {
function publishGitTag(tasks, version) {
const tag = `v${version}`;
tasks.push(
{
title: 'Tagging the latest commit',
task: () => execa('git', ['tag', `v${version}`], { cwd: common.rootDir })
title: `Tag latest commit ${chalk.dim(`(${tag})`)}`,
task: () => execa('git', ['tag', `${tag}`], { cwd: common.rootDir })
},
{
title: 'Pushing to Github',
title: 'Push tag to Github',
task: () => execa('git', ['push', '--follow-tags'], { cwd: common.rootDir })
}
);