-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
go install
leaves the binary "unversioned"
#1439
Comments
This might sound wired but this somewhat intended behavior. But your point is still valid maybe we should have some go code generator that sets these values automatically. |
Not weird, merely unexpected. Should I use |
If there is a way to bake in the current tag or commit hash via |
This guide shows a way to do it, however it would require us providing a shell script that handles the different variables https://blog.alexellis.io/inject-build-time-vars-golang/ |
I think Go might actually support this natively now: golang/go#37475 |
Excellent! Since I build from source, I find it helpful be able to confirm that I indeed built the expected version of lazygit and installed it to the right place without checking file timestamps. |
I have the fix! Thank you. |
When I use
go install
to install lazygit, the resulting binary is "unversioned" according tolazygit --version
. I presume that we'd like to have some build metadata available, especially to help with debugging/diagnosing defects.go install
$HOME/.go/bin/lazygit --version
I get
commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64
, but I expect at least the commit hash in this metadata.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: