diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 07:55:43 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2026-10-27 07:55:47 +0100 |
| commit | b899c72b79d2e909abf6230239d3c9377fc58899 (patch) | |
| tree | 3c84d6eb69a5366d95fc85f04fa92d1ac7345b4d /AGENTS.md | |
| parent | 7d31997bd9118351e8a849d2101c5aacc0aae78b (diff) | |
build: single source of truth for the version
Version now lives only in [workspace.package] in the root Cargo.toml;
all three crates inherit it via version.workspace = true (this also fixes
gipfel-core, which had drifted to 0.1.0 while the others were 0.5.4).
edition/license are inherited the same way.
The About dialog now reads env!("CARGO_PKG_VERSION") instead of a
hardcoded string. A new test (changelog_top_matches_version) asserts the
top gipfel-X.Y.Z entry in ChangeLog equals the crate version, so the
manifest, the About dialog and the ChangeLog cannot drift apart.
AGENTS.md gains a "Releasing a new version" section documenting the flow
(bump workspace version, add ChangeLog entry, tag, git archive source
tarball).
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -123,6 +123,35 @@ models. If you regenerate, re-run the golden tests immediately. `dirs` + exe-relative) and font fallback, then get libcosmic itself to compile for `x86_64-pc-windows-gnu` (upstream does not test Windows). +## Releasing a new version + +The version has a **single source of truth**: `[workspace.package] version` in +the root `Cargo.toml`. All three crates inherit it (`version.workspace = true`), +and the app's **About dialog** reads it at compile time via +`env!("CARGO_PKG_VERSION")`. Do **not** hardcode a version anywhere else. + +To cut a release `X.Y.Z`: + +1. Bump `version` in `[workspace.package]` (root `Cargo.toml`). That updates all + three crates and the About dialog at once. +2. Add a new entry at the **top** of `ChangeLog`: + ``` + gipfel-X.Y.Z + * one line per user-visible change + ``` + The test `gipfel-app: changelog_top_matches_version` fails if the top + `gipfel-X.Y.Z` line does not equal the crate version, so the manifest and the + ChangeLog cannot drift apart. +3. `cargo test --lib --test golden` (with `GIPFEL_DATA` set) — must be green. +4. Commit, then tag: `git tag vX.Y.Z`. +5. Build the **source** tarball (tracked files only, no build artifacts): + ```sh + git archive --format=tar.gz --prefix=gipfel-X.Y.Z/ \ + -o ~/gipfel-X.Y.Z.tar.gz vX.Y.Z + ``` + Recipients build with `cargo build --release`. For a fully offline tarball, + run `cargo vendor --versioned-dirs vendor/` and commit `vendor/` first. + ## Do / Don't - ✅ Run `cargo test --lib --test golden` (with `GIPFEL_DATA` set) after any |
