build(packaging): single-source installer version; document release flow
The Inno Setup script hardcoded AppVersion '0.1.0' - a stale second source of truth that would ship the wrong version in Add/Remove Programs. It now takes the version at compile time via /DAppVersion (0.0.0-dev sentinel if omitted), and the README/CLAUDE.md build commands derive it from cim_suite.__version__. Also documents the full release sequence and notes-before-bump ordering in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -98,8 +98,10 @@ py -m venv .venv
|
||||
.venv\Scripts\pyinstaller --noconfirm --distpath packaging\dist --workpath packaging\build packaging\suite.spec
|
||||
$env:SUITE_SELFTEST="1"; .\packaging\dist\CIM-Service-Suite\CIM-Service-Suite.exe --module da12 --simulate; echo "exit=$LASTEXITCODE"; Remove-Item Env:\SUITE_SELFTEST
|
||||
|
||||
# Build installer (needs Inno Setup 6)
|
||||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" packaging\installer.iss
|
||||
# Build installer (needs Inno Setup 6). Version is single-sourced from pyproject.toml,
|
||||
# so pass it in (else the installer falls back to the 0.0.0-dev sentinel):
|
||||
$v = .venv\Scripts\python -c "import cim_suite; print(cim_suite.__version__)"
|
||||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppVersion=$v packaging\installer.iss
|
||||
```
|
||||
|
||||
The whole test suite runs headless with no hardware (`SimulatedStation` speaks the
|
||||
@@ -214,7 +216,8 @@ test fixtures.
|
||||
- **Spreadsheet export:** every data screen can be exported to `.xlsx`; the engine is
|
||||
`cim_suite/core/export/` and the per-module adoption checklist is in `docs/EXPORT.md`.
|
||||
- **Versioning & changelog:** SemVer, single-sourced from `[project] version` in
|
||||
`pyproject.toml` (`cim_suite.__version__` reads it; the frozen build bundles the file).
|
||||
`pyproject.toml` (`cim_suite.__version__` reads it; the frozen build bundles the file;
|
||||
the Inno Setup installer takes it via `ISCC /DAppVersion=...` — see Commands).
|
||||
Commits are Conventional Commits (`<type>: <desc>`) — validated by `.githooks/commit-msg`
|
||||
(install once with `python scripts/setup_hooks.py`). The deterministic
|
||||
`python scripts/bump.py` computes the next version from commit prefixes
|
||||
|
||||
23
README.md
23
README.md
@@ -60,8 +60,10 @@ A green `pytest` and a clean `ruff` are both part of "done" here.
|
||||
# One-folder executable (PyInstaller)
|
||||
.venv\Scripts\pyinstaller --noconfirm --distpath packaging\dist --workpath packaging\build packaging\suite.spec
|
||||
|
||||
# Windows installer (requires Inno Setup 6)
|
||||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" packaging\installer.iss
|
||||
# Windows installer (requires Inno Setup 6). Pass the version so the installer and
|
||||
# Add/Remove Programs match the app — it's single-sourced from pyproject.toml:
|
||||
$v = .venv\Scripts\python -c "import cim_suite; print(cim_suite.__version__)"
|
||||
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppVersion=$v packaging\installer.iss
|
||||
```
|
||||
|
||||
## Versioning & releases
|
||||
@@ -98,10 +100,19 @@ are **two records of change, with different audiences**:
|
||||
```
|
||||
|
||||
The version string lives in **one place** — `[project] version` in `pyproject.toml`;
|
||||
`cim_suite.__version__` reads from it. The bump level is computed from commit prefixes,
|
||||
never by an LLM. The changelog *prose* is the only LLM-assisted step and is never
|
||||
committed without review. Releases start from the last `vX.Y.Z` git tag (or a
|
||||
`--baseline <rev>` you pass when there's no tag yet).
|
||||
`cim_suite.__version__` reads from it, and the installer takes it via `/DAppVersion`.
|
||||
The bump level is computed from commit prefixes, never by an LLM. The changelog *prose*
|
||||
is the only LLM-assisted step and is never committed without review. Releases start from
|
||||
the last `vX.Y.Z` git tag (or a `--baseline <rev>` you pass when there's no tag yet).
|
||||
|
||||
**Cutting a release** (order matters — draft notes *before* bumping, so the suggested
|
||||
version is correct):
|
||||
|
||||
1. `/release-notes` in Claude Code → review/approve the draft → it writes `CHANGELOG.md`.
|
||||
2. `python scripts\bump.py` → updates `pyproject.toml`.
|
||||
3. `git commit -am "chore: release X.Y.Z"` (the release commit itself doesn't bump).
|
||||
4. `git tag vX.Y.Z`
|
||||
5. `git push --follow-tags` (pushes the commit and the new tag together).
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
; Start-menu shortcut. No VB6 runtime / OCX registration required.
|
||||
|
||||
#define AppName "CIMTechniques Service Suite"
|
||||
#define AppVersion "0.1.0"
|
||||
; Version is single-sourced from pyproject.toml; pass it in at compile time, e.g.:
|
||||
; ISCC.exe /DAppVersion=1.2.3 packaging\installer.iss
|
||||
; (see README "Versioning & releases"). The fallback is a sentinel that signals the
|
||||
; /D define was forgotten — never ship an installer built with it.
|
||||
#ifndef AppVersion
|
||||
#define AppVersion "0.0.0-dev"
|
||||
#endif
|
||||
#define AppPublisher "CIMTechniques, Inc."
|
||||
#define AppExeName "CIM-Service-Suite.exe"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user