Automate versioning + changelog on every deploy (v0.2.0)

- 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>
This commit is contained in:
2026-06-06 17:00:47 -05:00
parent e381b615d6
commit 99b4dd2368
5 changed files with 190 additions and 24 deletions

View File

@@ -1,26 +1,18 @@
"""App version + changelog.
"""App version + changelog, sourced from changelog.json (single source of truth).
To cut a release: bump __version__ and prepend a new entry to CHANGELOG
(newest first), then keep CHANGELOG.md in sync. The version chip in the footer
links to /changelog, which renders these entries.
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.
"""
__version__ = "0.1.0"
import json
import os
# Newest first. Each release lists what's new in plain language.
CHANGELOG = [
{
"version": "0.1.0",
"date": "2026-06-06",
"title": "First tracked release",
"changes": [
"Crash-safe data storage — saves are now atomic and a corrupted file can no longer take the app down.",
"Transactions moved to a SQLite database: faster, and safe when edited from two tabs at once. Existing transactions were migrated automatically.",
"New Settings page (⚙️) to store your Gmail login and reminder preferences securely — no passwords in the code anymore.",
"Suggestions & feedback (💡) is now reachable from every page; what you send becomes a tracked issue.",
"Bill email reminders now use the Gmail login from Settings.",
"Automatic daily backups of all your data (local for now; Backblaze cloud once a bucket is set up).",
"Fixed the Monthly view crashing on the budget total.",
"Added this version number and changelog.",
],
},
]
_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"