Files
Moon-Household-Budget/version.py
2026-06-06 19:12:43 -05:00

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"