No version surface in the binary: embed the commit hash and expose it #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Deliberately excluded from #19, which added
make build, so it is filed here rather than lost.The org Go styleguide wants the git commit hash embedded at build time (
-X main.Version) and surfaced at startup. This repo has no version surface at all, so it is more than a linker flag.Definition of done
main.Versionvariable set via-ldflags -Xfrommake build.-vflag, and the score screen — but this is a faithful port of Rogue 5.4.4, so anything that changes what the player sees during a normal game is a divergence from C and needs justifying as one. A-vflag that exits immediately is the least invasive and is the presumed answer unless someone argues otherwise.go buildwith no ldflags must still produce a runnable binary, not an empty version string that reads as a bug).make checkgreen;TODO.mdCompleted Steps entry in the same commit; commit title ends(closes #N).Priority
Low. No defect behind it, and it must not alter in-game display without a deliberate decision.