2017-06-25 16:59:08 +08:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
|
|
|
- tip
|
|
|
|
|
2017-07-20 16:08:17 +08:00
|
|
|
env:
|
|
|
|
- "PATH=/home/travis/gopath/bin:$PATH"
|
|
|
|
|
2017-06-25 16:59:08 +08:00
|
|
|
install:
|
2017-07-25 19:11:03 +08:00
|
|
|
- go get ./...
|
2017-07-20 16:08:17 +08:00
|
|
|
- go get github.com/mitchellh/gox
|
|
|
|
- go get github.com/tcnksm/ghr
|
2017-07-25 19:11:03 +08:00
|
|
|
# Install gometalinter and certain linters
|
|
|
|
- go get github.com/alecthomas/gometalinter
|
|
|
|
- go get github.com/client9/misspell/cmd/misspell
|
|
|
|
- go get github.com/gordonklaus/ineffassign
|
|
|
|
- go get golang.org/x/tools/cmd/goimports
|
|
|
|
- go get github.com/tsenart/deadcode
|
2017-06-25 16:59:08 +08:00
|
|
|
|
|
|
|
script:
|
2017-07-25 19:25:15 +08:00
|
|
|
- gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --exclude="rice-box.go" --tests ./...
|
2017-07-25 19:33:47 +08:00
|
|
|
- go test ./... -timeout 30s
|
2017-07-20 16:13:36 +08:00
|
|
|
- cd cmd/filemanager
|
2017-07-20 16:13:08 +08:00
|
|
|
- mkdir dist
|
2017-07-20 16:08:17 +08:00
|
|
|
- gox -output "dist/{{.OS}}-{{.Arch}}-{{.Dir}}"
|
|
|
|
- ls dist/
|
|
|
|
- ghr --username hacdias --token $GITHUB_TOKEN --replace --prerelease --debug latest dist/
|
2017-07-26 16:05:41 +08:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: $GITHUB_TOKEN
|
|
|
|
file_glob: true
|
2017-07-27 01:33:51 +08:00
|
|
|
file: dist/*
|
2017-07-26 16:05:41 +08:00
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|