mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 02:24:10 +08:00
build: changes for primary branch rename to main
.
Changes part of the `DIRECT` phase of the "renaming master to main" planning doc.
This commit is contained in:
parent
a99c9adb7f
commit
8da926966e
@ -7,5 +7,5 @@ import { GithubConfig } from '@angular/dev-infra-private/ng-dev';
|
|||||||
export const github: GithubConfig = {
|
export const github: GithubConfig = {
|
||||||
owner: 'angular',
|
owner: 'angular',
|
||||||
name: 'angular-cli',
|
name: 'angular-cli',
|
||||||
mainBranchName: 'master',
|
mainBranchName: 'main',
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"schedule": ["after 10pm every weekday", "before 4am every weekday", "every weekend"],
|
"schedule": ["after 10pm every weekday", "before 4am every weekday", "every weekend"],
|
||||||
"baseBranches": ["master"],
|
"baseBranches": ["main"],
|
||||||
"ignoreDeps": ["@types/node", "quicktype-core"],
|
"ignoreDeps": ["@types/node", "quicktype-core"],
|
||||||
"packageFiles": [
|
"packageFiles": [
|
||||||
"WORKSPACE",
|
"WORKSPACE",
|
||||||
|
@ -65,10 +65,10 @@ function _branchCheck(args: PublishArgs, logger: logging.Logger) {
|
|||||||
const branch = ref.trim().replace(/^refs\/heads\//, '');
|
const branch = ref.trim().replace(/^refs\/heads\//, '');
|
||||||
|
|
||||||
switch (branch) {
|
switch (branch) {
|
||||||
case 'master':
|
case 'main':
|
||||||
if (args.tag !== 'next') {
|
if (args.tag !== 'next') {
|
||||||
throw new Error(tags.oneLine`
|
throw new Error(tags.oneLine`
|
||||||
Releasing from master requires a next tag. Use --no-branchCheck to
|
Releasing from main requires a next tag. Use --no-branchCheck to
|
||||||
skip this check.
|
skip this check.
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ export default async function (opts: SnapshotsOptions, logger: logging.Logger) {
|
|||||||
|
|
||||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-cli-publish-'));
|
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'angular-cli-publish-'));
|
||||||
const message = execSync(`git log --format="%h %s" -n1`).toString().trim();
|
const message = execSync(`git log --format="%h %s" -n1`).toString().trim();
|
||||||
let branch = opts.branch || 'master';
|
let branch = opts.branch || 'main';
|
||||||
|
|
||||||
// CIRCLE_BRANCH
|
// CIRCLE_BRANCH
|
||||||
if (typeof process.env['CIRCLE_BRANCH'] == 'string') {
|
if (typeof process.env['CIRCLE_BRANCH'] == 'string') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user