Open pboguslawski opened 2 years ago
It turns out with the way the debug build info is set, this is not really possible to do consistently, as the build info can only be read in the main
package, and we need the info in main
and http handler.
@nrwiersma would it not be possible to derive this information in the main package and pass it to the handler?
I could see changing build.go to a pointer whose value can be set once from main
and read by many packages.
I've recently discovered we actually do provide a way to get a versioned Go binary: https://docs.gomods.io/install/build-from-source/
I've recently discovered we actually do provide a way to get a versioned Go binary:
This does not resolve issue which is about installing with go install
, without messing with compiler flags.
I think that's fair. I've assigned this to our 1.0.0 milestone because if you can go install
you can probably follow the versioned binary instructions. Redoing the build system would be a larger effort. This may fall under having more reproducible builds as well.
Describe the bug When you build athens using
go install
, no version nor build time is set:Expected behavior
Version and build date are set automatically based on version selected by
go install
for installation and current time.May help: https://www.reddit.com/r/golang/comments/u1a7ah/how_to_embed_version_when_go_installing_since_you/
Environment (please complete the following information):