Name: build-tools
Owner: DRUD
Description: Build tools for inclusion in other projects for standard approach to building
Created: 2017-01-29 17:42:56.0
Updated: 2017-07-26 17:53:50.0
Pushed: 2018-02-21 22:07:17.0
Size: 139
Language: Makefile
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
These build tools live at https://github.com/drud/build-tools. If you are viewing this README in any other repository, it's important to know that modifications should never be made directly, and instead should be made to the base repository and pulled in via the instructions below.
These tools add standard components (sub-makefiles and build scripts) as well as example starters for the Makefile and .circleci/config.yml.
Download the build_updates.sh script and run it in the directory where the build-tools should be added.
Download the latest build_updates.sh and run it in the build-tools directory:
uild-tools
-O build_updates.sh https://raw.githubusercontent.com/drud/build-tools/master/build_update.sh
d +x build_update.sh
ild_update.sh
Using this base will allow you to build with standard targets like build, test, container, push, clean:
linux
darwin
gofmt
govet
govendor
golint
codecoroner
static (gofmt, govet, golint, govendor)
test
container
push
VERSION=0.3.0 container
VERSION=0.3.0 push
clean
On Windows, using the tools described below, use the command:
Program Files\git\bin\bash" -c "make"
Program Files\git\bin\bash" -c "make test"
Program Files\git\bin\bash" -c "make test TESTARGS='-run TestSomething'"
Program Files\git\bin\bash" -c "make gofmt"
If you're using Powershell instead of cmd, just prepend an &
on the command, as in:
\Program Files\git\bin\bash" -c "make"
(Note that if you're working with the code, you can just run git bash and do make (and anything else you want) from inside it.)
You'll need:
On windows the building is somewhat more difficult due to the build being bash/linux/make-oriented, but support is provided. You need:
(You can certainly install the base gnu make package, and the traditional git for windows package should work fine. Chocolatey installs are recommended here because there are many, many ways to get mixes of unix-style components that absolutely don't work. Microsoft's lovely bash-for-windows is a great tool, but it's an actual Ubuntu environment so isn't a good place for testing Windows builds.)
golang projects and static analysis functions like gofmt are built in a container from drud/golang-build-container (from https://github.com/drud/golang-build-container). The version of the container is specified in build-tools.