-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.travis.yml
38 lines (38 loc) · 1.88 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
language: go
sudo: required
services:
- docker
go:
- 1.8.1
before_install:
- go get -u github.com/kardianos/govendor
- go get github.com/mitchellh/gox
- export GO_VERSION=$(go version | cut -d' ' -f3 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
install:
- govendor sync
script:
- go build main.go
after_success:
# Build most binaries with GOX
- gox -os "linux windows darwin" -arch "amd64 386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
# Rename the Linux binary so that it's clearly based on gnu/glibc
- mv dist/copy-docker-image_linux_amd64 dist/copy-docker-image_linux_amd64_gnu
# Build a Musl based binary for Apline Linux based users
- docker run --rm -v $GOPATH:/go -w /go/src/github.com/mdlavin/copy-docker-image quay.io/mdlavin/go-alpine-musl:$GO_VERSION
- mv copy-docker-image dist/copy-docker-image_linux_amd64_musl
deploy:
provider: releases
api_key:
secure: KsGWr0SutbYTNTaTO9nnYZUpO6Pki+oh1MsOGIquhJUBvDtT0VxHvRTIttA3Ziv/xJf6BKiSLBI885gC4/zavohqgk0WqtAQyiNtfmv/5o2fenRbgqjz75ak+pvOw2CyCKeRuo7R32FK1S0HKk4dTQua79toZjRyZcY3gTX2vzEHrEdRQSp8WQyHCfHE60de+sDGQZxQ0bcnfrMy4cSfSJ7hlpTywwJpBhURib1nY1q6RSotOrJBhmhTpBTEgn1AiIF51cYdtxmJJA4MrO6JEpyiciQvLrUquS/3w8k0+NmMYik0G12ECM3p6e/l9Qzb0tkMjPYvDWBMTHw4r/lObiJFV9V/Mc6iaP0PKyjKHEdx49ywMN0xspfEhm1H6R6YsxSEBGrdBvU7vhCDQh7TBZZJ7SqcW1jkNfpRY7wgTg4WCUzMJB8TD6rWEl+/LLb70uVjOKJaz0kXkDYc+RRG8+C2r3NPabfQ/pDBZoZvP87E2vyQ9M5Fo7vm8CIXDUF6VBHX8t4drCY5pTEN7UE3gH15An1S5njN+Kd4VMqeHfySO0ARceSZXiQcsgyZ3k/cVfX3rqDxXcAJYyli7IMX9QuPaGbtkDFejZqIWlrLs2EsQui/4r3RhQNVpUHtQjMlxQfa46TI9oScAnoMfDjY4S82nuIm328lKmAcRRNNQVw=
file:
- dist/copy-docker-image_darwin_amd64
- dist/copy-docker-image_darwin_386
- dist/copy-docker-image_linux_amd64_gnu
- dist/copy-docker-image_linux_amd64_musl
- dist/copy-docker-image_linux_386
- dist/copy-docker-image_windows_amd64.exe
- dist/copy-docker-image_windows_386.exe
on:
repo: mdlavin/copy-docker-image
tags: true
skip_cleanup: true