Merge pull request #66 from noslouch/patch-1

FIX: patch version bumps
This commit is contained in:
Phil 2020-11-18 06:48:18 +01:00 committed by GitHub
commit f0f88bf408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,10 @@ Toolkit.run(async tools => {
const majorWords = process.env['INPUT_MAJOR-WORDING'].split(',')
const minorWords = process.env['INPUT_MINOR-WORDING'].split(',')
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
// if patch words aren't specified, any commit message qualifies as a patch
const patchWords = process.env['INPUT_PATCH-WORDING'] ? process.env['INPUT_PATCH-WORDING'].split(',') : null
let version = process.env.INPUT_DEFAULT || 'patch'
let foundWord = null
@ -50,7 +52,7 @@ Toolkit.run(async tools => {
))) {
const preid = foundWord.split('-')[1]
version = `prerelease --preid=${preid}`
} else if (patchWords && Array.isArray(patchWords) && patchWords.length) {
} else if (Array.isArray(patchWords) && patchWords.length) {
if (!messages.some(message => patchWords.some(word => message.includes(word)))) {
version = null
}