From 226230c5afb0db04791efe66a8cb0e0ed4f142e7 Mon Sep 17 00:00:00 2001 From: tulios Date: Wed, 31 Jul 2019 09:40:03 +0200 Subject: [PATCH] Ignore pre-release versions on version bump commits --- scripts/pipeline/checkBetaEligibility.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pipeline/checkBetaEligibility.js b/scripts/pipeline/checkBetaEligibility.js index 9e606f566..50da9f2e7 100755 --- a/scripts/pipeline/checkBetaEligibility.js +++ b/scripts/pipeline/checkBetaEligibility.js @@ -31,9 +31,14 @@ const hasEligibleFiles = changedFiles.some(filePath => { return isEligigle }) -if (hasEligibleFiles) { +const isBumpVersionCommit = changedFiles.every(filePath => + ['package.json', 'CHANGELOG.md'].includes(filePath) +) + +if (hasEligibleFiles && !isBumpVersionCommit) { console.log('Build has eligible files, continue to pre-release') } else { console.log('Skip pre-release, no changes in relevant files') + console.log(`isBumpVersionCommit: ${isBumpVersionCommit}`) console.log('##vso[task.setvariable variable=SKIP_PRE_RELEASE;isOutput=true]true') }