From d2aab699b554b759b10b17d96dcf87d34c49f1c9 Mon Sep 17 00:00:00 2001 From: mariosch Date: Thu, 1 Jul 2021 12:50:22 +0300 Subject: [PATCH] Attempt to fix prerelease --- index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3340074..c74138c 100644 --- a/index.js +++ b/index.js @@ -44,8 +44,10 @@ Toolkit.run(async (tools) => { ) ) { version = 'major'; + tools.log('Version is set to major'); } else if (messages.some((message) => minorWords.some((word) => message.includes(word)))) { version = 'minor'; + tools.log('Version is set to minor'); } else if ( messages.some((message) => preReleaseWords.some((word) => { @@ -60,19 +62,22 @@ Toolkit.run(async (tools) => { ) { preid = foundWord.split('-')[1]; version = 'prerelease'; + tools.log('Version is set to prerelease2'); } else if (Array.isArray(patchWords) && patchWords.length) { if (!messages.some((message) => patchWords.some((word) => message.includes(word)))) { version = null; + tools.log('Version is set to null 2'); } } else if (process.env.INPUT_DEFAULT === 'prerelease'){ + tools.log('Version is set to prerelease'); version = 'prerelease'; } // case: if default=prerelease, but rc-wording is also set // then unset it and do not run, when no rc words found in message tools.log('Before Login'); - tools.log(version); - tools.log('PreID: ' + preid); + tools.log(version); // null + tools.log('PreID: ' + preid); //prc tools.log(process.env.INPUT_DEFAULT); if (version === 'prerelease' && !messages.some((message) => preReleaseWords.some((word) => message.includes(word))) && process.env.INPUT_DEFAULT != 'prerelease') { tools.log('Version is set to null');