minor: also listen on major/minor in commit message

This commit is contained in:
phips28 2020-02-13 20:36:18 +01:00
부모 d4cbd20a7b
커밋 ac65c5e4a7
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@ -10,9 +10,9 @@ you'll need to configured that workflow yourself. You can look to the
### Workflow
* Based on the commit messages, increment the version from the lastest release.
* If the string "BREAKING CHANGE" is found anywhere in any of the commit messages or descriptions the major
* If the string "BREAKING CHANGE" or "major" is found anywhere in any of the commit messages or descriptions the major
version will be incremented.
* If a commit message begins with the string "feat" then the minor version will be increased. This works
* If a commit message begins with the string "feat" or "minor" then the minor version will be increased. This works
for most common commit metadata for feature additions: `"feat: new API"` and `"feature: new API"`.
* All other changes will increment the patch version.
* Push the bumped npm version in package.json back into the repo.

파일 보기

@ -21,9 +21,10 @@ Toolkit.run(async tools => {
}
let version = 'patch'
if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true)) {
if (messages.map(message => message.includes('BREAKING CHANGE') || message.includes('major')).includes(true)) {
version = 'major'
} else if (messages.map(message => message.toLowerCase().startsWith('feat')).includes(true)) {
} else if (messages.map(
message => message.toLowerCase().startsWith('feat') || message.toLowerCase().includes('minor')).includes(true)) {
version = 'minor'
}