It has been bugging me for a while that our builds don't embed the build environment into the compiled binaries. Go supports this with ldflags and goreleaser supports using environment variables with ldflags.
This PR adds a version.go file and two functions useful for printing the version information along with automation to build using goreleaser and the associated github action. The README is updated as well so that folks building locally can learn how to properly set the environment variables.
This PR also cleans up a few things in the goreleaser file to allow building for all architectures. The docker container remains amd64 only.
It has been bugging me for a while that our builds don't embed the build environment into the compiled binaries. Go supports this with ldflags and goreleaser supports using environment variables with ldflags.
This PR adds a version.go file and two functions useful for printing the version information along with automation to build using goreleaser and the associated github action. The README is updated as well so that folks building locally can learn how to properly set the environment variables.
This PR also cleans up a few things in the goreleaser file to allow building for all architectures. The docker container remains amd64 only.
Output on Linux
Output using docker: