Skip to content

Commit 103a9e3

Browse files
committed
fix: add custom commit parser for legacy format so changelog populates
Made-with: Cursor
1 parent 3d647ff commit 103a9e3

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,68 @@
33
<!-- version list -->
44

55
## Unreleased
6+
7+
### Bug Fixes
8+
9+
- Bypass uv run in dev mode, fix pipe deadlock
10+
([`5e5285e`](https://github.com/v0id-user/setmac/commit/5e5285e47d689d0f24fd5a4bc2b5f12eae1f8b93))
11+
12+
- Capture stderr, add timeout, fix log privacy, handle log type
13+
([`281ece1`](https://github.com/v0id-user/setmac/commit/281ece103c35eb358608516df0cdab984749a730))
14+
15+
- Harden dev status streaming against pipe stalls
16+
([`7315ee0`](https://github.com/v0id-user/setmac/commit/7315ee049097a3105d0944936110163885b914ef))
17+
18+
- Rename bundled CLI binary to setmac-cli to fix APFS case collision
19+
([`060e49e`](https://github.com/v0id-user/setmac/commit/060e49eb79a52879d77bdd96d15831c442fa5cf9))
20+
21+
- Use VERSION from env in bundle.sh, fix dmg.sh error message
22+
([`03632c1`](https://github.com/v0id-user/setmac/commit/03632c18fd8b75227bd2d055ee8c8c8791642087))
23+
24+
### Chores
25+
26+
- Gitignore PyInstaller spec files
27+
([`3d793a0`](https://github.com/v0id-user/setmac/commit/3d793a0d5eff1d450482e2f6a871db04dfcc1bf1))
28+
29+
- Update LICENSE copyright holder
30+
([`68401de`](https://github.com/v0id-user/setmac/commit/68401dea82de21253f3bbfc1a4c6cf633c8c6a55))
31+
32+
### Code Style
33+
34+
- Set default sidebar width to 240pt
35+
([`157baaa`](https://github.com/v0id-user/setmac/commit/157baaaae4b89b0d8dbd5577fa760431d821f615))
36+
37+
### Continuous Integration
38+
39+
- Add release workflow for stable and beta
40+
([`a269eb5`](https://github.com/v0id-user/setmac/commit/a269eb51cdcaba1b880fbbfb7bf20f16495d3aec))
41+
42+
### Documentation
43+
44+
- Add CLAUDE.md and .cursorrules with project conventions
45+
([`7cdd2b8`](https://github.com/v0id-user/setmac/commit/7cdd2b8a6f789bef1cbdea6c1d9e1f328ac6acd6))
46+
47+
- Update CLIBridge dev mode docs to reflect venv bypass
48+
([`da2938a`](https://github.com/v0id-user/setmac/commit/da2938aca6372043cc828a788b52688fa432b4b4))
49+
50+
- Update README and rules for releases and conventional commits
51+
([`3d647ff`](https://github.com/v0id-user/setmac/commit/3d647ffcef3a470fed65697b5994a2dc2dcbc44f))
52+
53+
### Features
54+
55+
- Add os.Logger across all app paths for runtime debugging
56+
([`6572697`](https://github.com/v0id-user/setmac/commit/6572697c646ca823a4e2f764beeabbcbab4d9f3a))
57+
58+
- Add semantic-release pipeline with changelog and release recipes
59+
([`8ce8d3f`](https://github.com/v0id-user/setmac/commit/8ce8d3f80a3addd66d82e0ca98207c8a31c6344e))
60+
61+
- Stream os.log alongside app in make dev
62+
([`fb2af9b`](https://github.com/v0id-user/setmac/commit/fb2af9ba2fac36090a84fdb5145b7cf9b31375b7))
63+
64+
### Refactoring
65+
66+
- Read app version from bundle at runtime
67+
([`e82f05d`](https://github.com/v0id-user/setmac/commit/e82f05db85a210588d35aca9e5dc6a4e9c398908))
68+
69+
- Replace Makefile with justfile
70+
([`b1530e3`](https://github.com/v0id-user/setmac/commit/b1530e3c507b95cd874fb04778cc52314cc02238))

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ packages = ["releasetools"]
1616

1717
[tool.semantic_release]
1818
branch = "main"
19+
commit_parser = "releasetools.commit_parser:SetmacCommitParser"
1920
version_toml = ["pyproject.toml:project.version", "cli/pyproject.toml:project.version"]
2021
build_command = "bash scripts/release-build.sh"
2122
upload_to_vcs_release = true

releasetools/commit_parser.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""Custom commit parser that supports both conventional and legacy commit(type): format."""
2+
3+
from re import sub
4+
5+
from semantic_release.commit_parser.conventional.parser import (
6+
ConventionalCommitParser,
7+
ConventionalCommitParserOptions,
8+
)
9+
from semantic_release.commit_parser.token import ParsedMessageResult
10+
11+
12+
def _normalize_message(message: str) -> str:
13+
"""Convert commit(type): msg to type: msg for backward compatibility."""
14+
return sub(r"^commit\((feat|fix|chore|docs|style|refactor|test|ci|perf|build)\):\s*", r"\1: ", message, count=1)
15+
16+
17+
class SetmacCommitParser(ConventionalCommitParser):
18+
"""Parser that accepts both conventional and legacy commit(type): format."""
19+
20+
def parse_message(self, message: str) -> ParsedMessageResult | None:
21+
normalized = _normalize_message(message)
22+
return super().parse_message(normalized)

0 commit comments

Comments
 (0)