From 490f462e5011a01ca8c3c12610f685ae12e23cf6 Mon Sep 17 00:00:00 2001 From: Robert Breker Date: Tue, 22 Dec 2015 21:06:48 +0000 Subject: [PATCH] Automatically upload builds for releases Also default to build with go tip in Travis to simplify cross-OS-builds Signed-off-by: Robert Breker --- .travis.yml | 22 +++++++++++++++++++--- Makefile | 3 ++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a28eb59..92aa434 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,23 @@ language: go sudo: false go: - - release +- tip 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 +- 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 +before_deploy: +- make release +deploy: + provider: releases + api_key: + secure: hUhY3ZB2/eHHi4ah8DlX5C5s3OTlHFc7FmHGuZJveMHfaiqfnhaIwR0AOVLcL1iLWr+7um/Fm/qXwSJtPOlvCgTC6/Q/qxEqUWsD9rQje9NTjGBbGSxe47pwsNCdDVmusrp0xIcBZ1c22SmIBX6tfbDmoaPvLT6oT24BdDWsh/WiGVYuuVSbgmfKXddghA/fK28ksk46dnvKkbX4YtjGT+rRe9Z4cOx81xFuhEcW9bODntIMEIwCWX2jMIyciJwyZfVhGnNrbbLmPeqKhe+/KvxZsAD3oD2eh+te4Pd1UTtBtUlbaqQfhkOKDm9syn+TAaDrUqAIQ6B3qIyxnZmYsg9V4ASt/ha7skG3i/CTDsNv2Cz8KZV0/DuHCtfoMSt7F6rSclxtiOMo3W1kWLXiurA15zunpzr2J/KxJO1ULxAaNsEMN59+30oC7Lv4hr6ZvafzPDIJsB7mpwFbx7djmTrpDYdQoVHbfNGa8HnJFuDH0bRkwSbMpQfkRmhPKnuPd030KW0Igs34Q8PAedOwm9TZ24JDv/W+jmFyrFfrFZmNga667SKXJ2rExbwPvtxJR1eP3pv1K+ckI+XPj9fxJeZCj2f4TAPIrgs6608RGjOkqTI15qP6+rKrAV/+KFUjtw7HsiSgo9k9xl06ZNKFOvIzYVGJ+GN5DWRLDAw+n/E= + skip_cleanup: true + file: + - docker-machine-driver-xenserver_darwin-386 + - docker-machine-driver-xenserver_darwin-amd64 + - docker-machine-driver-xenserver_linux-386 + - docker-machine-driver-xenserver_linux-amd64 + on: + repo: xenserver/docker-machine-driver-xenserver + tags: true diff --git a/Makefile b/Makefile index 0a35b8b..f61810a 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ build: go build ./... .PHONY: install + go get ./... go install ./... .PHONY: clean @@ -17,9 +18,9 @@ clean: .PHONY: release release: + go get ./... 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