forked from aerokube/ggr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (49 loc) · 1.65 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
54
55
sudo: required
language: go
go:
- 1.12.5
services:
- docker
script:
- export GO111MODULE="on"
- go test -tags 'watch' -v -race -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/aerokube/ggr
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -tags 'watch' -o ggr-watch -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
- gox -os "linux darwin windows" -arch "amd64" -osarch="windows/386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"
install:
- go get -u github.com/mitchellh/gox # cross compile
deploy:
- provider: releases
api-key: $GITHUB_TOKEN
file_glob: true
file: dist/*
skip_cleanup: true
on:
tags: true
- provider: script
script: travis/docker-push.sh latest
skip_cleanup: true
on:
branch: master
- provider: script
script: travis/docker-push.sh $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
- provider: script
script: travis/docker-push.sh latest-release
skip_cleanup: true
on:
tags: true
- provider: script
script: travis/docs.sh latest
skip_cleanup: true
on:
branch: master
- provider: script
script: travis/docs.sh $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
after_success:
- bash <(curl -s https://codecov.io/bash)