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:
Paul Gschwendtner 2022-04-25 13:15:22 +00:00 committed by Joey Perrott
parent a99c9adb7f
commit 8da926966e
4 changed files with 5 additions and 5 deletions

View File

@ -7,5 +7,5 @@ import { GithubConfig } from '@angular/dev-infra-private/ng-dev';
export const github: GithubConfig = {
owner: 'angular',
name: 'angular-cli',
mainBranchName: 'master',
mainBranchName: 'main',
};

View File

@ -10,7 +10,7 @@
"enabled": true
},
"schedule": ["after 10pm every weekday", "before 4am every weekday", "every weekend"],
"baseBranches": ["master"],
"baseBranches": ["main"],
"ignoreDeps": ["@types/node", "quicktype-core"],
"packageFiles": [
"WORKSPACE",

View File

@ -65,10 +65,10 @@ function _branchCheck(args: PublishArgs, logger: logging.Logger) {
const branch = ref.trim().replace(/^refs\/heads\//, '');
switch (branch) {
case 'master':
case 'main':
if (args.tag !== 'next') {
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.
`);
}

View File

@ -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 message = execSync(`git log --format="%h %s" -n1`).toString().trim();
let branch = opts.branch || 'master';
let branch = opts.branch || 'main';
// CIRCLE_BRANCH
if (typeof process.env['CIRCLE_BRANCH'] == 'string') {