fix prerelease selection logic
This commit is contained in:
parent
51c1769211
commit
279b636703
5
index.js
5
index.js
|
@ -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}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue