Skip to content

Commit 42b4f58

Browse files
committed
chore: make major bump opt-in via feat(skill) scope
1 parent 17950c1 commit 42b4f58

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ name: Auto Release
44
# whenever commits land on main.
55
#
66
# Bump rules (see scripts/bump-version.sh):
7-
# feat: ... -> MAJOR (new feature)
7+
# feat(skill): ... -> MAJOR (explicit opt-in; only way to bump major)
88
# feat(inverter): ... -> MINOR (new inverter support)
9+
# feat: ... -> MINOR (new feature)
910
# fix:/chore:/docs:... -> PATCH (bug fix / maintenance)
1011
#
1112
# The version is bumped in api/__init__.py, committed back to main, tagged,

‎scripts/bump-version.sh‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# tag, and (optionally) write it back to api/__init__.py.
44
#
55
# 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)
910
# fix:/chore:/docs:/refactor:/perf:/test:/ci: -> PATCH (bug fix / maintenance)
1011
# BREAKING CHANGE / ! -> MAJOR
1112
#
@@ -84,14 +85,18 @@ if [[ -z "$FORCE_BUMP" ]]; then
8485
BUMP="major"
8586
break
8687
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)
8994
if [[ "$subject" =~ ^feat\(inverter\) ]]; then
9095
[[ "$BUMP" != "major" ]] && BUMP="minor"
9196
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"
95100
fi
96101
done < <(git log --format='%s' "$RANGE" 2>/dev/null || true)
97102
fi

0 commit comments

Comments
 (0)