This commit is contained in:
phips28 2020-11-16 20:26:17 +01:00
parent f89fbceca4
commit 4a6678f279
1 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ Toolkit.run(async tools => {
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',') const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',') const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
let version = process.env['INPUT_DEFAULT'] || 'patch' let version = process.env.INPUT_DEFAULT || 'patch'
let foundWord = null let foundWord = null
if (messages.some( if (messages.some(
@ -40,13 +40,13 @@ Toolkit.run(async tools => {
} else if (messages.some(message => minorWords.some(word => message.includes(word)))) { } else if (messages.some(message => minorWords.some(word => message.includes(word)))) {
version = 'minor' version = 'minor'
} else if (messages.some(message => preReleaseWords.some(word => { } else if (messages.some(message => preReleaseWords.some(word => {
if (message.includes(word)) { if (message.includes(word)) {
foundWord = word foundWord = word
return true return true
} else { } else {
return false return false
}
} }
}
))) { ))) {
const preid = foundWord.split('-')[1] const preid = foundWord.split('-')[1]
version = `prerelease --preid=${preid}` version = `prerelease --preid=${preid}`