Skip to content

Commit

Permalink
feat: allow the feat! to define as breaking change too
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Apr 29, 2020
1 parent 50b456c commit 30580f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ func main() {
}

var breaking = regexp.MustCompile("(?im).*breaking change:.*")
var breakingBang = regexp.MustCompile("(?im).*(feat|fix|build|chore|ci|docs|style|refactor|perf|test)(\\(.*\\))?!:.*")
var feature = regexp.MustCompile("(?im).*feat(\\(.*\\))?:.*")
var patch = regexp.MustCompile("(?im).*fix(\\(.*\\))?:.*")

func findNext(current *semver.Version, tag string) semver.Version {
log, err := getChangelog(tag)
app.FatalIfError(err, "failed to get changelog")

if breaking.MatchString(log) {
if breaking.MatchString(log) || breakingBang.MatchString(log) {
return current.IncMajor()
}

Expand Down

0 comments on commit 30580f2

Please sign in to comment.