-
Notifications
You must be signed in to change notification settings - Fork 123
build+loop: add the commit hash to GetInfoResponse and change version semantics
#914
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
build+loop: add the commit hash to GetInfoResponse and change version semantics
#914
Conversation
Makefile
Outdated
| GOMOD := GO111MODULE=on go mod | ||
|
|
||
| COMMIT := $(shell git describe --abbrev=40 --dirty) | ||
| COMMIT := $(shell git describe --abbrev=40 --dirty --tags --long) |
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.
another option could be to add a separate COMMIT_HASH and then set that separately to the COMMIT one.
but that of course would result in needing a new global variable & then a new commit_hash rpc field in GetInfo.
So I guess we just need to decide if we want to keep the COMMIT working as it does today where if the "pure" tagged version is being run, then no commit hash is included in this variable.
But if it doesnt matter, then this is probs the easiest solution.
wdyt?
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.
Great idea, PTAL.
989f163 to
055712b
Compare
GetInfoResponse and change version semantics
055712b to
a0dd983
Compare
sputn1ck
left a comment
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.
LGTM! Thanks for the change!
6d3b3c4 to
cbb74f4
Compare
With this commit we extend GetinfoResponse with the strict commit hash (which also includes whether the build tree was clean or dirty).
cbb74f4 to
9a6266f
Compare
ellemouton
left a comment
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.
nice - lgtm!!
| GOMOD := GO111MODULE=on go mod | ||
|
|
||
| COMMIT := $(shell git describe --abbrev=40 --dirty) | ||
| COMMIT := $(shell git describe --abbrev=40 --dirty | sed -E 's/.*-g([0-9a-f]{40})(-dirty)?/\1\2/') |
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.
nice!
With this commit we extend
GetinfoResponsewith the strict commit hash (which also includes whether the build tree was clean or dirty).