From fad45ab5908eb4b32cc11f173cdb09d26ca82f92 Mon Sep 17 00:00:00 2001 From: Frederico Gauz Date: Wed, 3 Mar 2021 06:19:10 -0800 Subject: [PATCH] forgot to run ncc --- .github/actions/bumpVersion/index.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/bumpVersion/index.js b/.github/actions/bumpVersion/index.js index 687d27fb2ee5..cc208ce0c23c 100644 --- a/.github/actions/bumpVersion/index.js +++ b/.github/actions/bumpVersion/index.js @@ -55,10 +55,18 @@ do { // tags come from latest to oldest const highestVersion = tags[0]; - console.log(highestVersion); + console.log(`Highest version found: ${highestVersion}.`); - // should SEMVER_LEVEL default to BUILD? - const semanticVersionLevel = core.getInput('SEMVER_LEVEL', {require: true}); + let semanticVersionLevel = core.getInput('SEMVER_LEVEL', {require: true}); + + // SEMVER_LEVEL defaults to BUILD + // it actually would fall to build anyway, but I think it is better to make it explicity + if (!semanticVersionLevel || !Object.values(functions.semanticVersionLevels) + .find(v => v === semanticVersionLevel)) { + // eslint-disable-next-line max-len, semi + console.log(`Invalid input for 'SEMVER_LEVEL': ${semanticVersionLevel},defaulting to: ${functions.semanticVersionLevels.build}`) + semanticVersionLevel = functions.semanticVersionLevels.build; + } const newVersion = functions.incrementVersion(highestVersion, semanticVersionLevel); core.setOutput('VERSION', newVersion);