diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e89c254 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: go +go: + - 1.5.1 + +install: true +script: "./bin/package.sh" + +deploy: + provider: releases + skip_cleanup: true + api_key: + secure: cb8hpYYUDstAgce5n9KEiXysWMj3ln7MO4BhtFQ90AH54zg/mNJ2aTGZoSkd5h5u5u0jdU4C9kXTcN8VzFpcSR11YInFl2j+P16JtkKbOTqkBuEO+56QZH04c1t4LUjonmPhyyi1Ru1WSbA7ohr13MN/mPbLziJhhytU37tcQxNc3VQ+gGrDsVTjE/E5MzEGzpZtCEU3tA8gFK/FbknI67m80tby0GiZLAuEmt4K8HfAmTC1bwxzg2qFnduRfKhg9HiQaS/xFUGqT3MqSW86k9bS7cWqdPItH8oEMdToUOv1cwpuVsLqjMZXjzZCvnbQ8ynbAPxWUHza9KHtBTXpf8dpAYiv0PXbmU+zA0s0RZg6pyxNrPw+ldfQY6FgeKz69j+O3NfCXSr+qqZTisARcmKzlx5KQpfmm6mzieFUe/n6Yr8FXkZjqZMecMDjdyJGfBG7CdWTQGXvAvfmtpKt7Jw5ZRWqIWvPCHIElAws/HQbac31SflWLlkTaTYKVdImUzfGftgLNjwFRzwDKuJS+wFYN8QMNb8MQYArr0R9RUVinksvCvBI5VPBLCKKGG0KSh+BDa89y5e2CZ4gjC0tllIGdJItYcCrpKiOFsTP+HxKcsysctxYryA9HvTcp8S4Tg7Lp9L2fVhCowBs0d7qAAt7mPJ009nYQ9sOWoEfTh4= + file: + - bin/docker-machine-driver-ovh-darwin-amd64 + - bin/docker-machine-driver-ovh-linux-amd64 + - bin/docker-machine-driver-ovh-windows-amd64 + on: + repo: yadutaf/docker-machine-driver-ovh + tags: true + +notifications: + email: + recipients: + - jt+travis-docker-machine@yadutaf.fr diff --git a/bin/package.sh b/bin/package.sh new file mode 100755 index 0000000..649aa2e --- /dev/null +++ b/bin/package.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +OS="darwin linux windows" +ARCH="amd64" + +echo "Getting build dependencies" +go get -u github.com/golang/lint/golint + +echo "Ensuring code quality" +go vet ./... +golint ./... + +for GOOS in $OS; do + for GOARCH in $ARCH; do + architecture="${GOOS}-${GOARCH}" + echo "Building ${architecture}" + export GOOS=$GOOS + export GOARCH=$GOARCH + go get + go build -o bin/docker-machine-driver-ovh-${architecture} + done +done