• Matthew Holt's avatar
    Implant version information with -ldflags with help of build script · da08c94a
    Matthew Holt authored
    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.
    da08c94a
main_test.go 1.92 KB