-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add version and revision in config response #297
Conversation
// commit or checkout revision | ||
// from build information | ||
func GetShortRevision() string { | ||
if info, ok := debug.ReadBuildInfo(); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go 1.18
supports version control information. https://pkg.go.dev/runtime/debug#ReadBuildInfo
LGTM! Is revision the same as SHA? If so, my preference would be to call it a SHA, since that's what we've been referring to it internally as. But I'm also happy to learn a new term. Aside: TIL 7-char SHAs redirect to the full URL. |
@jeffdaley Yea, I thought about this and settled on revision. Wanted to follow what Golang suggests |
Co-authored-by: Josh Freda <[email protected]>
This PR adds
version
andshort_revision
in the/api/v1/web/config
API response.Note: This change won't affect the
hermes version
command output. It will continue showing the version number of the application.