case: if default=prerelease, but rc-wording is also set

then unset it and do not run, when no rc words found in message
This commit is contained in:
phips28 2021-05-20 23:41:12 +02:00
parent a6841af4ed
commit 7985e8de63
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,12 @@ Toolkit.run(async (tools) => {
} }
} }
// case: if default=prerelease, but rc-wording is also set
// then unset it and do not run, when no rc words found in message
if (version === 'prerelease' && !messages.some((message) => preReleaseWords.some((word) => message.includes(word)))) {
version = null;
}
if (version === 'prerelease' && preid) { if (version === 'prerelease' && preid) {
version = `${version} --preid=${preid}`; version = `${version} --preid=${preid}`;
} }