forked from aerokube/cm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (48 loc) · 1.55 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
sudo: required
language: go
go:
- 1.11.1
services:
- docker
script:
- export GO111MODULE="on"
- go test -race -v github.com/aerokube/cm/selenoid -coverprofile=coverage.txt -covermode=atomic -coverpkg github.com/aerokube/cm/selenoid
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X github.com/aerokube/cm/cmd.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X github.com/aerokube/cm/cmd.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 github.com/aerokube/cm/cmd.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X github.com/aerokube/cm/cmd.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)