1
0
Fork 0

Update building stuff

- Add a Makefile with common targets (binary, test, validate, ..)
- Use docker to build it (isolated)

And update circleci to work with the new Makefile..

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-09-15 21:38:54 +02:00
parent fd835e1fcd
commit 0ea80582d2
14 changed files with 278 additions and 10 deletions

View file

@ -6,15 +6,17 @@ machine:
dependencies:
pre:
- go generate
- CGO_ENABLED=0 go build -a -installsuffix nocgo .
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gox -verbose -os "linux darwin windows" --output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
- make validate
override:
- make binary
test:
override:
- make test
post:
- echo $REPO
- docker build -t ${REPO,,} .
- make image
deployment:
github:
@ -24,4 +26,4 @@ deployment:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push ${REPO,,}:latest
- docker tag ${REPO,,}:latest ${REPO,,}:$CIRCLE_SHA1
- docker push ${REPO,,}:$CIRCLE_SHA1
- docker push ${REPO,,}:$CIRCLE_SHA1