mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: remove older branch migration helpers (#36888)
* build: remove older branch migration helpers * chore: fix typo
This commit is contained in:
@@ -6,11 +6,6 @@ const path = require('path');
|
||||
const ELECTRON_DIR = path.resolve(__dirname, '..', '..');
|
||||
const SRC_DIR = path.resolve(ELECTRON_DIR, '..');
|
||||
|
||||
const RELEASE_BRANCH_PATTERN = /(\d)+-(?:(?:[0-9]+-x$)|(?:x+-y$))/;
|
||||
// TODO(main-migration): Simplify once main branch is renamed
|
||||
const MAIN_BRANCH_PATTERN = /^(main|master)$/;
|
||||
const ORIGIN_MAIN_BRANCH_PATTERN = /^origin\/(main|master)$/;
|
||||
|
||||
require('colors');
|
||||
const pass = '✓'.green;
|
||||
const fail = '✗'.red;
|
||||
@@ -76,6 +71,10 @@ async function handleGitCall (args, gitDir) {
|
||||
}
|
||||
|
||||
async function getCurrentBranch (gitDir) {
|
||||
const RELEASE_BRANCH_PATTERN = /^\d+-x-y$/;
|
||||
const MAIN_BRANCH_PATTERN = /^main$/;
|
||||
const ORIGIN_MAIN_BRANCH_PATTERN = /^origin\/main$/;
|
||||
|
||||
let branch = await handleGitCall(['rev-parse', '--abbrev-ref', 'HEAD'], gitDir);
|
||||
if (!MAIN_BRANCH_PATTERN.test(branch) && !RELEASE_BRANCH_PATTERN.test(branch)) {
|
||||
const lastCommit = await handleGitCall(['rev-parse', 'HEAD'], gitDir);
|
||||
|
||||
Reference in New Issue
Block a user