-
Notifications
You must be signed in to change notification settings - Fork 95
gpython: Display build information and support some builtin attribute #44
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
Comments
Looks like we can inject the commit log by using ldflag during build time. |
This is slightly awkward to do as it can't be done using the standard I do this in rclone and I have a Makefile which does the build If you build rclone not via the Makefile you get a I'm pretty sure you can do this with go-releaser which we use to build the release binaries. I had a chat with the debian maintainer about rclone and this issue, and his thoughts were that the program should build using the normal go tools to make the correct version number at the releases. Which kind of implies when we make a release, we should check in the build description. That is what I do in rclone anyway, but the Makefile adds a git ID for non release builds. |
not sure there's anything else than what if we wanted to also support Windows, we could perhaps use |
Probably the simplest thing is to go with what goreleaser provides us with: So make a version.go file with this in package main
var (
version = "dev"
commit = "none"
date = "unknown"
) Then the release builds will have the correct version, commit and date in. The dev builds will have "dev" "none" and "unknown".
This provides most of what we need here. Note that we should show the go runtime version os and arch too as that is really important debugging info.
|
@ncw LGTM |
Looks like a good first issue for a newbie of this project.
|
Likewise, PyPy3, if we can display build information such as commit information, go version.
it will be awesome.
Also, we need to implement
copyright
,credits
andlicense
as a built-in attribute.The text was updated successfully, but these errors were encountered: