-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
27 lines (27 loc) · 1.05 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
sudo: false
language: go
go: go1.8
go_import_path: go.zeta.pm/disguard
services:
- docker
install:
- go get github.com/kardianos/govendor github.com/golang/lint/golint
script:
- golint -set_exit_status $(govendor list -no-status +local)
- govendor vet +local
- govendor test -v -race +local
after_success:
- bash <(curl -s https://codecov.io/bash)
- if [ "$TRAVIS_BRANCH" == "master" ]; then
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o disguard cmd/disguard/main.go;
docker build -t zeta0/disguard .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push zeta0/disguard;
fi
- if [ -n "$TRAVIS_TAG" ]; then
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o disguard cmd/disguard/main.go;
docker build -t zeta0/disguard:$TRAVIS_TAG .;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push zeta0/disguard:$TRAVIS_TAG;
bash <(curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest);
fi