This commit is contained in:
Kevin Mahoney 2022-10-26 15:07:21 -04:00 committed by Kevin Mahoney
parent 279b636703
commit 933159043f
No known key found for this signature in database
GPG Key ID: 5089CDB39882808C
1 changed files with 3 additions and 4 deletions

View File

@ -20,7 +20,7 @@ const pkg = getPackageJson();
console.log("Couldn't find any commits in this event, incrementing patch version..."); console.log("Couldn't find any commits in this event, incrementing patch version...");
} }
const allowedTypes = ['major', 'minor', 'patch', 'prerelease'] const allowedTypes = ['major', 'minor', 'patch', 'prerelease'];
if (process.env['INPUT_VERSION-TYPE'] && !allowedTypes.includes(process.env['INPUT_VERSION-TYPE'])) { if (process.env['INPUT_VERSION-TYPE'] && !allowedTypes.includes(process.env['INPUT_VERSION-TYPE'])) {
exitFailure('Invalid version type'); exitFailure('Invalid version type');
return; return;
@ -103,7 +103,7 @@ const pkg = getPackageJson();
}), }),
) )
) { ) {
if (foundWord !== ''){ if (foundWord !== '') {
preid = foundWord.split('-')[1]; preid = foundWord.split('-')[1];
} }
version = 'prerelease'; version = 'prerelease';
@ -119,8 +119,7 @@ const pkg = getPackageJson();
if ( if (
version === 'prerelease' && version === 'prerelease' &&
preReleaseWords && preReleaseWords &&
!messages.some((message) => preReleaseWords.some((word) => message.includes(word)) && !messages.some((message) => preReleaseWords.some((word) => message.includes(word)) && !versionType)
!versionType)
) { ) {
version = null; version = null;
} }