supported preid for default prerelease version
This commit is contained in:
parent
5e5a584898
commit
ab791d324d
10
index.js
10
index.js
|
@ -37,7 +37,7 @@ Toolkit.run(async tools => {
|
|||
|
||||
let version = process.env.INPUT_DEFAULT || 'patch'
|
||||
let foundWord = null
|
||||
|
||||
let preid = process.env.INPUT_PREID;
|
||||
if (messages.some(
|
||||
message => /^([a-zA-Z]+)(\(.+\))?(\!)\:/.test(message) || majorWords.some(word => message.includes(word)))) {
|
||||
version = 'major'
|
||||
|
@ -52,14 +52,18 @@ Toolkit.run(async tools => {
|
|||
}
|
||||
}
|
||||
))) {
|
||||
const preid = process.env.INPUT_PREID || foundWord.split('-')[1]
|
||||
version = `prerelease --preid=${preid}`
|
||||
preid = foundWord.split('-')[1]
|
||||
version = 'prerelease'
|
||||
} else if (Array.isArray(patchWords) && patchWords.length) {
|
||||
if (!messages.some(message => patchWords.some(word => message.includes(word)))) {
|
||||
version = null
|
||||
}
|
||||
}
|
||||
|
||||
if (version === 'prerelease' && preid) {
|
||||
version = `${version} --preid=${preid}`
|
||||
}
|
||||
|
||||
if (version === null) {
|
||||
tools.exit.success('No version keywords found, skipping bump.')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue