From: Eduardo San Martin Morote Date: Mon, 8 Nov 2021 10:13:59 +0000 (+0100) Subject: build: ignore branch check X-Git-Tag: @pinia/nuxt@0.1.3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fb256ec1b7fa36ce008832d312fd347273b8118;p=thirdparty%2Fvuejs%2Fpinia.git build: ignore branch check --- 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)`,