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 })
}
);

View File

@ -28,8 +28,10 @@
"ionic-core": "node ../core/node_modules/.bin/stencil build",
"ionic-core-dev": "node ../core/node_modules/.bin/stencil build --dev",
"lint": "tslint --project .",
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
"test": "echo 'angular no tests yet'",
"tsc": "tsc -p ."
"tsc": "tsc -p .",
"validate": "npm i && npm run lint && npm run test && npm run build"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@ -4,8 +4,8 @@
"description": "Ionic mono-repo root package.json, used mainly to execute build scripts. This package is not published to npm.",
"private": true,
"scripts": {
"prepare.deploy": "node .scripts/prepare.js",
"deploy": "node .scripts/publish.js",
"release.prepare": "node .scripts/prepare.js",
"release": "node .scripts/release.js",
"changelog": "conventional-changelog -p angular -i ./CHANGELOG.md -k core -s"
},
"devDependencies": {