1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2026-05-16 09:20:15 +02:00
This commit is contained in:
Carlos Alexandro Becker
2017-01-02 13:57:36 -02:00
parent 16e137acdb
commit 0bc1c75d6f
3 changed files with 19 additions and 27 deletions
+3 -19
View File
@@ -1,24 +1,8 @@
language: go
go: 1.7.4
install:
- go get github.com/alecthomas/gometalinter
- go get github.com/Masterminds/glide
- glide install
script:
- go test -cover `glide nv`
- gometalinter --vendor --disable-all \
--enable=deadcode \
--enable=ineffassign \
--enable=gosimple \
--enable=staticcheck \
--enable=gofmt \
--enable=goimports \
--enable=dupl \
--enable=misspell \
--enable=errcheck \
--deadline=2m \
./...
install: make install
script: make ci
after_success:
test ! -z "$TRAVIS_TAG" && go run main.go
test -n "$TRAVIS_TAG" && go run main.go
notifications:
email: false
+15 -7
View File
@@ -3,18 +3,26 @@ TEST_PATTERN?=.
TEST_OPTIONS?=
setup: ## Install all the build and lint dependencies
curl https://glide.sh/get | sh
go get -u github.com/kisielk/errcheck
go get -u github.com/golang/lint/golint
go get -u github.com/alecthomas/gometalinter
go get -u github.com/Masterminds/glide
glide install
test: ## Run all the tests
go test $(TEST_OPTIONS) -cover $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s
lint: ## Run all the linters
errcheck $(SOURCE_FILES)
go vet $(SOURCE_FILES)
golint ./... | grep -v vendor
gometalinter --vendor --disable-all \
--enable=deadcode \
--enable=ineffassign \
--enable=gosimple \
--enable=staticcheck \
--enable=gofmt \
--enable=goimports \
--enable=dupl \
--enable=misspell \
--enable=errcheck \
--deadline=2m \
./...
ci: lint test ## Run all the tests and code checks
@@ -25,4 +33,4 @@ build: ## Build a beta version of releaser
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
.DEFAULT_GOAL := build
+1 -1
View File
@@ -82,7 +82,7 @@ You may want to wire this to auto-deploy your new tags on travis, for example:
```yaml
after_success:
test ! -z "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash
test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash
```
## How the end result looks like