forked from bengadbois/pewpew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 1.49 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
language: go
go:
- "1.10"
install:
- go get github.com/mattn/goveralls
- go get github.com/alecthomas/gometalinter
- gometalinter --install
- curl -sL https://github.com/golang/dep/releases/download/v0.3.1/dep-linux-amd64 > dep
- chmod +x ./dep
- ./dep ensure
script:
- go get -t ./...
- goveralls -service=travis-ci
- gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode -E structcheck -E varcheck --tests --vendor ./...
before_deploy:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- # make an dist/OS_ARCH.tar.gz for each platform, and put the binary in the top level
- gox -ldflags="-X \"github.com/bengadbois/pewpew/cmd.buildTime=$(date)\" -X \"github.com/bengadbois/pewpew/cmd.version=$TRAVIS_TAG\"" -output "dist/{{.OS}}_{{.Arch}}/{{.Dir}}/{{.Dir}}"
- for i in $(find dist -mindepth 1 -maxdepth 1 -type d); do tar -czf "$i".tar.gz -C "$i" "."; done
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file:
- dist/darwin_386.tar.gz
- dist/darwin_amd64.tar.gz
- dist/freebsd_386.tar.gz
- dist/freebsd_amd64.tar.gz
- dist/freebsd_arm.tar.gz
- dist/linux_386.tar.gz
- dist/linux_amd64.tar.gz
- dist/linux_arm.tar.gz
- dist/netbsd_386.tar.gz
- dist/netbsd_amd64.tar.gz
- dist/netbsd_arm.tar.gz
- dist/openbsd_386.tar.gz
- dist/openbsd_amd64.tar.gz
- dist/windows_386.tar.gz
- dist/windows_amd64.tar.gz
skip_cleanup: true
on:
tags: true
go: "1.10"