|
3 | 3 | # tag, and (optionally) write it back to api/__init__.py. |
4 | 4 | # |
5 | 5 | # Bump rules (Conventional Commits): |
6 | | -# feat: ... -> MAJOR (new feature) |
7 | | -# feat(scope): ... -> MAJOR (new feature, any scope) |
8 | | -# feat(inverter): ... -> MINOR (new inverter support) |
| 6 | +# feat(skill): ... -> MAJOR (explicit opt-in; only way to bump major) |
| 7 | +# feat(inverter): ... -> MINOR (new inverter support) |
| 8 | +# feat: ... -> MINOR (new feature) |
| 9 | +# feat(scope): ... -> MINOR (new feature, any scope) |
9 | 10 | # fix:/chore:/docs:/refactor:/perf:/test:/ci: -> PATCH (bug fix / maintenance) |
10 | 11 | # BREAKING CHANGE / ! -> MAJOR |
11 | 12 | # |
@@ -84,14 +85,18 @@ if [[ -z "$FORCE_BUMP" ]]; then |
84 | 85 | BUMP="major" |
85 | 86 | break |
86 | 87 | fi |
87 | | - # feat(inverter) -> minor (new inverter support), but only if no |
88 | | - # higher-priority bump (major) has already been seen. |
| 88 | + # feat(skill) -> major (explicit opt-in; only way to bump major) |
| 89 | + if [[ "$subject" =~ ^feat\(skill\) ]]; then |
| 90 | + BUMP="major" |
| 91 | + break |
| 92 | + fi |
| 93 | + # feat(inverter) -> minor (new inverter support) |
89 | 94 | if [[ "$subject" =~ ^feat\(inverter\) ]]; then |
90 | 95 | [[ "$BUMP" != "major" ]] && BUMP="minor" |
91 | 96 | fi |
92 | | - # feat (non-inverter) -> major (new feature) |
93 | | - if [[ "$subject" =~ ^feat ]] && [[ ! "$subject" =~ ^feat\(inverter\) ]]; then |
94 | | - BUMP="major" |
| 97 | + # feat (plain or any other scope) -> minor (new feature) |
| 98 | + if [[ "$subject" =~ ^feat ]]; then |
| 99 | + [[ "$BUMP" != "major" ]] && BUMP="minor" |
95 | 100 | fi |
96 | 101 | done < <(git log --format='%s' "$RANGE" 2>/dev/null || true) |
97 | 102 | fi |
|
0 commit comments