From 3fb256ec1b7fa36ce008832d312fd347273b8118 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 8 Nov 2021 11:13:59 +0100 Subject: [PATCH] build: ignore branch check --- scripts/release.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/release.mjs b/scripts/release.mjs index 1a433825..3d8d4013 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -55,6 +55,15 @@ async function main() { console.log(chalk.red(`Git repo isn't clean.`)) return } + + if (currentBranch !== EXPECTED_BRANCH) { + console.log( + chalk.red( + `You should be on brach "${EXPECTED_BRANCH}" but are on "${currentBranch}"` + ) + ) + return + } } else { console.log(chalk.bold.white(`Skipping git checks...`)) } @@ -63,15 +72,6 @@ async function main() { await run('git', ['branch', '--show-current'], { stdio: 'pipe' }) ).stdout - if (currentBranch !== EXPECTED_BRANCH) { - console.log( - chalk.red( - `You should be on brach "${EXPECTED_BRANCH}" but are on "${currentBranch}"` - ) - ) - return - } - if (!skipCleanGitCheck) { const isOutdatedRE = new RegExp( `\\W${EXPECTED_BRANCH}\\W.*(?:fast-forwardable|local out of date)`, -- 2.47.3