-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
53 lines (51 loc) · 2.58 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
sudo: required
os:
- linux
- osx
language: go
go:
- "1.10.3"
services:
- docker
script:
- go get -v
- go install
- GO_VERSION=1.8 $GOPATH/bin/rungo version | grep "go version go1.8"
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# Run integration tests
docker build -t adamlamar/rungo .
# Compile all supported releases
mkdir -p releases/linux/amd64 releases/linux/386 releases/darwin/amd64 releases/windows/amd64 releases/windows/386
GOOS=linux GOARCH=amd64 go build -o releases/linux/amd64/rungo
GOOS=linux GOARCH=386 go build -o releases/linux/386/rungo
GOOS=darwin GOARCH=amd64 go build -o releases/darwin/amd64/rungo
GOOS=windows GOARCH=amd64 go build -o releases/windows/amd64/rungo.exe
(cd releases/windows/amd64 && cp rungo.exe go.exe && cp rungo.exe gofmt.exe && cp rungo.exe godoc.exe)
GOOS=windows GOARCH=386 go build -o releases/windows/386/rungo.exe
(cd releases/windows/386 && cp rungo.exe go.exe && cp rungo.exe gofmt.exe && cp rungo.exe godoc.exe)
fi
before_deploy:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
tar czf rungo-$TRAVIS_TAG-linux-amd64.tar.gz -C releases/linux/amd64 rungo
tar czf rungo-$TRAVIS_TAG-linux-386.tar.gz -C releases/linux/386 rungo
tar czf rungo-$TRAVIS_TAG-osx-amd64.tar.gz -C releases/darwin/amd64 rungo
zip -j rungo-$TRAVIS_TAG-windows-amd64.zip releases/windows/amd64/go.exe releases/windows/amd64/gofmt.exe releases/windows/amd64/godoc.exe
zip -j rungo-$TRAVIS_TAG-windows-386.zip releases/windows/386/go.exe releases/windows/386/gofmt.exe releases/windows/386/godoc.exe
fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: Q66rlMDgy6a4NiK9hSme4pS592AFfkHFEd9XtCx/BcE/z+AKwMkBfwYXlsyqYGyyS5sRK/zFPCRCbtoWVnt+Pasm/s29Hr2CvZCWsEo262UoJGT6Y1rqFZ2PxWIlWOKe9ZWWuFTFz6PS4FFCux0CRahxpTHOztXav3xk3uOWaoCAnbNPdI0CoGFUwOGxAJYHwB/5Z01OSYQa36/TO8nuwJbCy7QDOrBNXwpZW2AEReaArIBV9PFT75QcPvqccA4RNBOuHLNuso5xelWG+Tbu/6W1bTJkJWXw3aVpF6wD2Uek16BIKexyOr7VzOz6AnSPo674pggx259CknQCclm+628MBl+QOXcNeOXV3R2hpHu5nEcOX9/Wm5u8TCWEwEYfKgwkfNQDazkizq7QNejoS33knWhcOe8MI7lO6J3O8lZIYfOjFX3L9ii1J38pwWHfcnWdrBRQD6b5JZFdkt6cOtZHa9CEdbjw//Wlqj0krZEoZWMCUI9F7O40PaZQim8e6LwjrzRpD4fHsATVQvK8UbSHP+QYYOBLKNishl1qV4qSi13MnC4dZwGoJWjgd8kjL7H0xXY62UdcihkVMqjpCfMOyGB/7zBd7WdCMBh+2D3BPXCPCzzXMH96bEoog2AXrL1Xrz+ZVgBAUipJSVMKnPCr7fUx6ttVaqkZXWVQCyk=
file:
- rungo-$TRAVIS_TAG-linux-amd64.tar.gz
- rungo-$TRAVIS_TAG-linux-386.tar.gz
- rungo-$TRAVIS_TAG-osx-amd64.tar.gz
- rungo-$TRAVIS_TAG-windows-amd64.zip
- rungo-$TRAVIS_TAG-windows-386.zip
on:
repo: adamlamar/rungo
tags: true
condition: $TRAVIS_OS_NAME = linux