From 15addeebd17f76d93b6d80183c3380ca99e460d8 Mon Sep 17 00:00:00 2001 From: Robert Breker Date: Tue, 22 Dec 2015 16:37:46 +0000 Subject: [PATCH 1/2] Add simple Makefile Signed-off-by: Robert Breker --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0a35b8b --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +.PHONY: build +build: + go get ./... + go build ./... + +.PHONY: install + go install ./... + +.PHONY: clean +clean: + if [ -f docker-machine-driver-xenserver ] ; then rm docker-machine-driver-xenserver ; fi + for arch in 386 amd64 ; do \ + for os in darwin linux ; do \ + if [ -f docker-machine-driver-xenserver_$$os-$$arch ] ; then rm docker-machine-driver-xenserver_$$os-$$arch ; fi ; \ + done \ + done + +.PHONY: release +release: + for arch in 386 amd64 ; do \ + for os in darwin linux ; do \ + GOOS=$$os GOARCH=$$arch go tool dist install pkg/runtime ; \ + GOOS=$$os GOARCH=$$arch go build -o docker-machine-driver-xenserver_$$os-$$arch ; \ + done \ + done From 286f2ddf09afee7456264d7153b447674c154e0b Mon Sep 17 00:00:00 2001 From: Robert Breker Date: Tue, 22 Dec 2015 16:41:14 +0000 Subject: [PATCH 2/2] Build in travis.yml Signed-off-by: Robert Breker --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5fd903d..a28eb59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,5 @@ sudo: false go: - release script: + - make - gofmtresult=$(gofmt -s -l .); if [[ -n $gofmtresult ]]; then echo -e "Please run \"gofmt -s -w .\" before committing for the below:\n$gofmtresult"; false; fi