- changelog.json is now the single source of truth; version.py reads it. - release.py: one command to bump version + prepend a changelog entry + regen CHANGELOG.md. Dogfooded to cut 0.2.0. - repo CLAUDE.md documents the MANDATORY 'cut a release on every deploy' rule + deploy/secrets conventions, so it applies to anyone who pulls the repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
19 lines
621 B
Python
19 lines
621 B
Python
"""App version + changelog, sourced from changelog.json (single source of truth).
|
|
|
|
Cut releases with: python release.py <version> "<what changed>" ...
|
|
That prepends an entry to changelog.json and regenerates CHANGELOG.md. The
|
|
footer version chip and the /changelog page read from here automatically.
|
|
"""
|
|
import json
|
|
import os
|
|
|
|
_CHANGELOG_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "changelog.json")
|
|
|
|
try:
|
|
with open(_CHANGELOG_PATH) as f:
|
|
CHANGELOG = json.load(f)
|
|
except (OSError, json.JSONDecodeError):
|
|
CHANGELOG = []
|
|
|
|
__version__ = CHANGELOG[0]["version"] if CHANGELOG else "0.0.0"
|