mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 02:24:10 +08:00
build: update release process to reflect including updates to package.json
Now included in the release process is updating the root package.json version.
This commit is contained in:
parent
ec387bfcea
commit
44a9bacfec
@ -106,6 +106,8 @@ As commits are cherry-picked when PRs are merged, creating the release should be
|
||||
|
||||
**Make sure you update the package versions in `packages/schematics/angular/utility/latest-versions.ts`.**
|
||||
|
||||
Update the version in the root package.json file to reflect the new release version.
|
||||
|
||||
```bash
|
||||
git commit -a -m 'release: vXX'
|
||||
git tag -a 'vXX' -m 'release: tag vXX'
|
||||
@ -116,7 +118,7 @@ we just created. Double check that the versions are correct by running the
|
||||
following command.
|
||||
|
||||
```bash
|
||||
yarn admin packages --version
|
||||
yarn admin packages --releaseCheck
|
||||
```
|
||||
|
||||
Now push the commit and the tag to the upstream repository. **Make sure to use
|
||||
|
@ -41,8 +41,12 @@ export interface PackageInfo {
|
||||
export type PackageMap = { [name: string]: PackageInfo };
|
||||
|
||||
|
||||
export function loadRootPackageJson() {
|
||||
return require('../package.json');
|
||||
}
|
||||
|
||||
function loadPackageJson(p: string) {
|
||||
const root = require('../package.json');
|
||||
const root = loadRootPackageJson();
|
||||
const pkg = require(p);
|
||||
|
||||
for (const key of Object.keys(root)) {
|
||||
|
@ -7,13 +7,31 @@
|
||||
*/
|
||||
// tslint:disable:no-implicit-dependencies
|
||||
import { logging } from '@angular-devkit/core';
|
||||
import chalk from 'chalk';
|
||||
|
||||
const { packages, loadRootPackageJson, stableToExperimentalVersion } = require('../lib/packages');
|
||||
|
||||
|
||||
const { packages } = require('../lib/packages');
|
||||
export default function(args: { json: boolean, version: boolean, releaseCheck: boolean }, logger: logging.Logger) {
|
||||
|
||||
if (args.releaseCheck) {
|
||||
const {version: root} = loadRootPackageJson();
|
||||
const experimental = stableToExperimentalVersion(root);
|
||||
logger.info(`The expected version for the release is ${chalk.bold(root)} (${experimental})`);
|
||||
logger.info(
|
||||
Object.keys(packages)
|
||||
.filter(name => !packages[name].private)
|
||||
.map(name => {
|
||||
let result = chalk.red('✘');
|
||||
const version = packages[name].version;
|
||||
if ([root, experimental].includes(version)) {
|
||||
result = chalk.green('✓');
|
||||
}
|
||||
|
||||
export default function(args: { json: boolean, version: boolean }, logger: logging.Logger) {
|
||||
if (args.json) {
|
||||
return ` ${result} ${name}@${packages[name].version}`;
|
||||
})
|
||||
.join('\n'));
|
||||
} else if (args.json) {
|
||||
logger.info(JSON.stringify(packages, null, 2));
|
||||
} else {
|
||||
logger.info(
|
||||
|
Loading…
x
Reference in New Issue
Block a user