fix prerelease selection logic

This commit is contained in:
Kevin Mahoney 2022-10-26 14:56:40 -04:00 committed by Kevin Mahoney
parent 51c1769211
commit 279b636703
No known key found for this signature in database
GPG Key ID: 5089CDB39882808C
1 changed files with 3 additions and 2 deletions

View File

@ -114,18 +114,19 @@ const pkg = getPackageJson();
// case: if default=prerelease, // case: if default=prerelease,
// rc-wording is also set // rc-wording is also set
// and does not include any of rc-wording // and does not include any of rc-wording
// and version-type is not strictly set
// then unset it and do not run // then unset it and do not run
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)
) { ) {
version = null; version = null;
} }
// case: if default=prerelease, but rc-wording is NOT set // case: if default=prerelease, but rc-wording is NOT set
if (version === 'prerelease' && preid) { if (version === 'prerelease' && preid) {
version = 'prerelease';
version = `${version} --preid=${preid}`; version = `${version} --preid=${preid}`;
} }