The implementation imitates the behavior of build-systems generated by
GNU Automake.
Implemented targets:
- install
- install-strip
- uninstall
Implemented variables:
- DESTDIR
- prefix
- bindir
- INSTALL_STRIP_FLAG
Internal implementation details:
- install-bins variable collects user binaries to be installed
- install-dirs variable collects directories to be created
- deb and rpm packages are now built for prereleases
- consolidate setup for deb & rpm
- man pages are generated for prereleases
- the `cli.github.com` site is only pushed to on full releases
Bonus:
- only publish the GitHub release after the Windows MSI is uploaded
- hub does not need downloading
Do not pass LDFLAGS as arguments to -ldflags, since these are passed to
'go tool link' and C compiler ldflags need to be passed as
-ldflags "-extldflags \"$LDFLAGS\"" with unreliable handling. Instead
copy over (unmodified) the standard environment variable to the special
golang-specific variable which the go compiler chooses to respect.
While we are at it, handle CPPFLAGS and CFLAGS too.
It's bad form to embed timestamps in binaries as it prevents
reproducible builds of the resulting binary.
The Reproducible Builds project defines SOURCE_DATE_EPOCH to help
reproduce binaries by allowing the date format to be overridden. This
patch adds support for this for GNU and BSD date.
Go 1.13 introduces `-trimpath` which strips build paths from all
compiled binaries. This enables people to reproduce the distributed cli
binary without having to recreate the build path.
https://reproducible-builds.org/specs/source-date-epoch/https://reproducible-builds.org/docs/build-path/
Signed-off-by: Morten Linderud <morten@linderud.pw>
`make site-docs`:
1. checks out the `gh-pages` branch into the `site/` directory;
2. regenerates `.md` help pages using Cobra;
3. commits and publishes updates.
This was a typo. Note that Makefile is only used for building a
development version after cloning from git; the tagged release process
uses `.goreleaser.yml` and skips the Makefile.