Commit Graph

6 Commits

Author SHA1 Message Date
Matthew Holt
19d6f666aa
Fix build script with default git repo path (cwd) 2016-04-25 22:10:16 -06:00
Matthew Holt
3ef78d3db3
Allow git repo as argument to build script
This will help build server perform builds with copy of repo in a folder
outside the original git repo folder. Also testing signed commits on
GitHub.
2016-04-05 18:57:50 -06:00
Matthew Holt
3f49b32086 Revert undesired changes to shell scripts 2016-03-20 14:13:50 -06:00
W-Mark Kubacki
74a5cb2fe3 Convert the barbarism in dist/automate.sh to proper BASH structure
When thy variables henceforth accept blessed white-space,
    guided will thy scripture be along righteous path(s).

    -- 4 BASH 3:42

Caddy's dist files sometimes ended up being owned by matt:staff or other
quite arcane and/or frightening names. If someone extracting didn't pay
attention a regular user who happened to have same uid by accident could
later tamper with the files' contents. It's 0:0 from now on.

Use all available threads when packaging distributables
Caddy binaries will be added to their archives in-place: This change
eliminates them being renamed within dist/builds one after another.
As does 'gox', dist/automate.sh will spare one available thread if possible.
2016-03-20 01:33:58 +01:00
W-Mark Kubacki
ba2e9d80fd Use best practices in build.bash
Format of main.buildDate has been locale-dependent,
and is now ISO-8601 compliant.

Caddy displayed with ```-version``` something like (mind the datetime format):

    Caddy 0.8.2 (+591b209 Fri Mar 18 21:22:55 UTC 2016)
     2 files changed, 9 insertions(+), 4 deletions(-)
    build.bash
    main.go

which is now:

    Caddy 0.8.2 (+591b209 2016-03-18 21:22:55Z)
     2 files changed, 9 insertions(+), 4 deletions(-)
    build.bash,main.go

See also:

 * http://wiki.bash-hackers.org/scripting/obsolete
 * https://google.github.io/styleguide/shell.xml
 * https://xkcd.com/1179/
2016-03-19 17:04:53 +01:00
Matthew Holt
da08c94a8c 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.
2016-02-26 00:26:31 -07:00