chore: display version, git hash, and build date in meshagent #10
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/version-display"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bake three build-time constants into the binary via
build.rsso operators can confirm the exact tree a running agent was built from when troubleshooting:MESHAGENT_VERSION- resolved release version. Mirrorsoci-build/get-version.nu(exact tag ->0.1.0, commits past tag ->0.1.0-3-g1b66909, no tag ->0.0.0-g<sha>) so the constant baked into the binary matches the Forgejo generic-package version published by CI.MESHAGENT_GIT_HASH- short HEAD SHA, orunknownoutside a git checkout.MESHAGENT_BUILD_DATE- UTC build timestamp (YYYY-MM-DDTHH:MM:SSZ).Wire-up:
meshagent --versionprints all three (claplong_version).info!line with all three at startup so the version is visible in journald/log aggregation without needing access to the binary itself.version/versionsconsole command (host msg relay used by the MeshCentral SPA) reports all three plus the protocol agent-version u32.host/msg.rsagent_versionfield now usesMESHAGENT_VERSION(git-describe) instead ofCARGO_PKG_VERSIONso the SPA's hardware-identifiers panel matches the published package version.Dev container Dockerfile now marks
/workspaceas asafe.directoryso the git-backed build script works against the bind-mounted host repo without the "dubious ownership" refusal.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com