-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Go 1.18 provides some built in information to retrieve VCS status from the binary via debug.BuildInfo
The runtime/debug.BuildInfo returned by runtime/debug.ReadBuildInfo() has been updated to include a new field Settings
[]debug.BuildSetting
. Settings in turn are key-value pairs describing a binary. The commit hash is the value for the keyvcs.revision
, andvcs.time
does what you would expect. There’s evenvcs.modified
to tell you if the build was “dirty” or “clean”.
An example implementation https://github.com/carlmjohnson/versioninfo
We should replace current implementation in version
with debug.BuildSetting
values.
Metadata
Metadata
Assignees
Labels
No labels