@@ -7,6 +7,94 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ## [ 0.3.2] — 2026-04-16
11+
12+ ### Added
13+ - Retroactive 0.3.1 entry in this CHANGELOG documenting the
14+ ` truestamp upgrade ` subcommand that shipped in that release. No
15+ functional changes in 0.3.2 itself; this release is primarily a
16+ smoke test of the new in-place upgrade flow introduced in 0.3.1
17+ (download archive, verify SHA-256, verify cosign bundle, atomic
18+ replace, darwin quarantine clear).
19+
20+ ## [ 0.3.1] — 2026-04-16
21+
22+ ### Added
23+ - ` truestamp upgrade ` subcommand with install-method detection.
24+ Homebrew installs print ` brew upgrade --cask truestamp/tap/truestamp-cli ` ,
25+ ` go install ` binaries print ` go install github.com/truestamp/truestamp-cli/cmd/truestamp@latest ` ,
26+ and install.sh / manual installs perform a native-Go in-place
27+ upgrade that mirrors ` docs/install.sh ` : download tarball, verify
28+ SHA-256 (mandatory, pure Go), verify cosign bundle (best-effort via
29+ shell-out to ` cosign ` when on ` PATH ` ; required when
30+ ` TRUESTAMP_REQUIRE_COSIGN=1 ` ), extract, atomic replace with
31+ ` .bak.<rfc3339> ` backup, clear the macOS quarantine xattr. A
32+ 7-day-old-backup prune runs on every successful upgrade.
33+ - ` --check ` flag on ` upgrade ` — report status without installing.
34+ Exit codes: ` 0 ` up-to-date, ` 1 ` upgrade available, ` 2 ` network
35+ error, ` 3 ` latest release is a pre-release.
36+ - ` --yes ` and ` --version <tag> ` flags on ` upgrade ` for non-interactive
37+ and pinned upgrades. Passing ` --version ` is the opt-in path for
38+ installing pre-release tags; without it, pre-releases are refused.
39+ - Pre-release defense is two-layer: GitHub's ` /releases/latest `
40+ endpoint already filters releases flagged ` prerelease: true ` , and
41+ our Go code additionally rejects any resolved tag with a semver
42+ pre-release suffix (e.g. ` v1.0.0-rc.1 ` ) unless ` --version ` was
43+ passed explicitly.
44+ - Passive "new version available" notice on stderr, emitted at most
45+ once per 24 hours (cached at
46+ ` $XDG_CACHE_HOME/truestamp/upgrade-check.json ` ). Suppressed when
47+ stderr is not a TTY, when the running binary is a ` dev ` build, when
48+ the resolved latest is a pre-release, and under any of seven CI env
49+ vars (` CI ` , ` GITHUB_ACTIONS ` , ` GITLAB_CI ` , ` CIRCLECI ` , ` BUILDKITE ` ,
50+ ` JENKINS_HOME ` , ` TF_BUILD ` ).
51+ - ` --no-upgrade-check ` persistent flag and ` TRUESTAMP_NO_UPGRADE_CHECK `
52+ env var to opt out of the passive notice.
53+ - New ` install ` line in ` truestamp version ` output showing the
54+ detected install method.
55+ - ` docs-serve ` Taskfile task —
56+ ` mise exec -- caddy file-server --listen :8080 --root docs ` —
57+ for previewing ` docs/index.html ` and testing ` docs/install.sh `
58+ changes locally before they reach ` get.truestamp.com ` .
59+ - ` caddy ` entry in ` .tool-versions ` so ` mise install ` bootstraps the
60+ binary used by ` task docs-serve ` via the Aqua backend
61+ (` caddyserver/caddy ` ).
62+ - New internal packages:
63+ - ` internal/install ` — classify the running binary by resolved
64+ executable path plus ` runtime/debug.BuildInfo ` . ` sameDir `
65+ resolves symlinks so ` /tmp → /private/tmp ` and other macOS
66+ symlinked prefixes classify correctly.
67+ - ` internal/selfupgrade ` — orchestrator plus SemVer,
68+ GitHub Releases client, SHA-256 + cosign verification, tar.gz
69+ extraction with path-traversal rejection, and Unix/Windows
70+ atomic-replace implementations.
71+ - ` internal/upgradecheck ` — passive check runner with JSON cache
72+ and all suppression rules.
73+ - ` DownloadCtx ` and ` DownloadBytesCtx ` helpers in ` internal/httpclient `
74+ (bounded, context-aware). ` DownloadCtx ` streams to disk with a
75+ 200 MB default cap.
76+ - Test suite additions: 111 total passing cases across the touched
77+ packages — path-heuristic coverage for all four install methods, a
78+ regression test for the ` sameDir ` symlink bug, httptest-stubbed
79+ ` selfupgrade.Check() ` tests locking in both layers of the
80+ pre-release defense, tar-extraction path-traversal rejection, all
81+ ` Disabled() ` suppression rules, cache round-trip, and
82+ ` cmd/upgrade ` 's routing + ` readYes ` + exit-code unwrapping.
83+
84+ ### Changed
85+ - ` truestamp version ` now includes a new ` install ` line reporting
86+ the detected install method (` homebrew ` , ` go install ` ,
87+ ` install.sh ` , or ` unknown ` ).
88+ - Root command's ` Execute() ` now recognises the internal
89+ ` exitCodeErr ` sentinel so ` upgrade --check ` can exit with a
90+ specific non-zero code without cobra printing an error line.
91+
92+ ### Notes
93+ - Windows is print-only for ` upgrade ` in this release —
94+ rename-running-exe-to-` .bak ` is deferred to a future minor version.
95+ Windows users always get ` go install …@latest ` printed regardless
96+ of detected method.
97+
1098## [ 0.3.0] — 2026-04-15
1199
12100### Added
@@ -123,7 +211,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
123211 v0.1.0 is the first release of a standalone Go codebase; the two share
124212 nothing beyond the repository name.
125213
126- [ Unreleased ] : https://github.com/truestamp/truestamp-cli/compare/v0.3.0...HEAD
214+ [ Unreleased ] : https://github.com/truestamp/truestamp-cli/compare/v0.3.2...HEAD
215+ [ 0.3.2 ] : https://github.com/truestamp/truestamp-cli/releases/tag/v0.3.2
216+ [ 0.3.1 ] : https://github.com/truestamp/truestamp-cli/releases/tag/v0.3.1
127217[ 0.3.0 ] : https://github.com/truestamp/truestamp-cli/releases/tag/v0.3.0
128218[ 0.2.0 ] : https://github.com/truestamp/truestamp-cli/releases/tag/v0.2.0
129219[ 0.1.0 ] : https://github.com/truestamp/truestamp-cli/releases/tag/v0.1.0
0 commit comments