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...");
}
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'])) {
exitFailure('Invalid version type');
return;
@ -119,8 +119,7 @@ const pkg = getPackageJson();
if (
version === 'prerelease' &&
preReleaseWords &&
!messages.some((message) => preReleaseWords.some((word) => message.includes(word)) &&
!versionType)
!messages.some((message) => preReleaseWords.some((word) => message.includes(word)) && !versionType)
) {
version = null;
}