base: add pi-devbox-version command + startup banner
Wraps /etc/pi-devbox/build-manifest.json (already written at docker-build time in Dockerfile.variant) into a human-readable summary instead of requiring users to know the manifest path and pipe it through jq themselves. - rootfs/usr/local/bin/pi-devbox-version: human (default) / --json / --quiet output modes. Also flags live drift — compares the baked pi_version against the actually-running `pi --version` and warns on mismatch rather than trusting the manifest blindly (same ground-truth philosophy as the manifest generation itself). Exits 1 with a short stderr notice on images built before the manifest existed, instead of failing silently. - entrypoint-user.sh: calls it as the very first line. CMD is `bash -l` with tty:true in compose, so this banner lands directly above the first prompt on container start — no separate motd/bashrc hook needed (deliberately not wired into .bash_aliases, which would reprint on every docker exec -it). - Dockerfile.base: COPY + chmod, same pattern as dot-watch/studio-expose. - scripts/smoke-test.sh: 4 new checks (binary present+executable, human output has release tag, --json round-trips the manifest, --quiet is a single line). - README.md / AGENTS.md / CHANGELOG.md updated.
This commit is contained in:
@@ -13,6 +13,22 @@ Pre-v1.0.0 tags followed the pi npm version (`v{pi_version}[letter]`).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- **`pi-devbox-version` command.** Wraps `/etc/pi-devbox/build-manifest.json`
|
||||
into a human-readable summary (release tag, build date, source revision,
|
||||
baked `pi_version`, and short SHAs for every `/opt` component) instead of
|
||||
requiring users to know the manifest path and pipe it through `jq`
|
||||
themselves. Also flags **live drift** — if `pi --version` no longer matches
|
||||
what was baked at build time, the `pi:` line calls that out rather than
|
||||
silently trusting the manifest. `--json` dumps the raw manifest for
|
||||
scripting; `--quiet` gives a one-line `release_tag (source_revision)` form.
|
||||
Printed automatically once at container start (`entrypoint-user.sh`, before
|
||||
the rest of the setup output), and stays available on demand for the rest
|
||||
of the session. Exits 1 with a short notice — rather than failing silently
|
||||
— on images built before this file existed. Base-affecting (new
|
||||
`rootfs/usr/local/bin/pi-devbox-version`), rebuilds `base-<hash>`.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Bundled `pi-toolkit` settings template: `pi-fork` balanced tier bumped to
|
||||
|
||||
Reference in New Issue
Block a user