Skip to content

Commit

Permalink
travis.yml updates (#4)
Browse files Browse the repository at this point in the history
Adding auto build/pushing tagged releases
Removing go 1.6 and tip
Remove golint
go vet instead of go test (no test cases exist)
  • Loading branch information
bengadbois authored Mar 14, 2017
1 parent 3f4c65c commit 4121306
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
language: go

go:
- 1.6.x
- 1.7.x
- 1.8
- tip

install:
- go get -t ./...
- go get github.com/golang/lint/golint
- go get github.com/gordonklaus/ineffassign
- go get github.com/opennota/check/cmd/aligncheck
Expand All @@ -16,13 +13,31 @@ install:
- go get github.com/client9/misspell/cmd/misspell

script:
- go get -t ./...
- diff <(echo -n) <(gofmt -s -d .)
- ineffassign .
- go test -race ./...
- go vet -race ./...
- aligncheck .
- structcheck .
- varcheck .
- misspell -error .
# recompile with glide AFTER doing code checks, as errors in dependencies in vendor/ will get caught ¯\_(ツ)_/¯
- go get -v github.com/Masterminds/glide
- cd $GOPATH/src/github.com/Masterminds/glide && git checkout tags/v0.12.3 && go install && cd -
- glide install
- go get ./...

after_success:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gox -output "dist/{{.OS}}_{{.Arch}}/{{.Dir}}/{{.Dir}}"
# make an dist/OS_ARCH.tar.gz for each, but put the binary in the top level
- for i in $(find dist -mindepth 1 -maxdepth 1 -type d); do tar -czf "$i".tar.gz -C "$i" "."; done

after_script:
- golint ./...
deploy:
provider: script
script: ghr --username bengadbois --token $GITHUB_TOKEN --replace --debug $(git tag -l --contains HEAD) dist/
skip_cleanup: true
on:
tags: true
go: 1.8

0 comments on commit 4121306

Please sign in to comment.