Implant version information with -ldflags with help of build script
Without -ldflags, the verison information needs to be updated manually, which is never done between releases, so development builds appear indiscernable from stable builds using `caddy -version`. This is part of a set of changes intended to relieve the burden of always updating version information manually and distributing binaries that look stable but actually may not be. A stable build is defined as one which is produced at a git tag with a clean working directory (no uncommitted changes). A dev build is anything else. With this build script, `caddy -version` will now reveal whether it is a development build and, if so, the base version, the latest commit, the date and time of build, and the names of files with changes as well as how many changes were made. The output of `caddy -version` for stable builds remains the same.
Showing
build.bash
0 → 100755
Please register or sign in to comment