Fix isVersionBump detection
This commit is contained in:
parent
e9e2a453a7
commit
3a297dd15f
2
index.js
2
index.js
|
@ -20,7 +20,7 @@ Toolkit.run(async tools => {
|
||||||
|
|
||||||
const commitMessage = process.env['INPUT_COMMIT-MESSAGE'] || 'ci: version bump to {{version}}'
|
const commitMessage = process.env['INPUT_COMMIT-MESSAGE'] || 'ci: version bump to {{version}}'
|
||||||
console.log('messages:', messages)
|
console.log('messages:', messages)
|
||||||
const commitMessageRegex = new RegExp(commitMessage.replace(/{{version}}/g, 'v\d\.\d\.\d'), 'ig');
|
const commitMessageRegex = new RegExp(commitMessage.replace(/{{version}}/g, 'v\\d+\\.\\d+\\.\\d+'), 'ig');
|
||||||
const isVersionBump = messages.find(message => commitMessageRegex.test(message)) !== undefined
|
const isVersionBump = messages.find(message => commitMessageRegex.test(message)) !== undefined
|
||||||
|
|
||||||
if (isVersionBump) {
|
if (isVersionBump) {
|
||||||
|
|
Loading…
Reference in New Issue