You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2026-05-16 09:20:15 +02:00
+3
-19
@@ -1,24 +1,8 @@
|
|||||||
language: go
|
language: go
|
||||||
go: 1.7.4
|
go: 1.7.4
|
||||||
install:
|
install: make setup
|
||||||
- go get github.com/alecthomas/gometalinter
|
|
||||||
- go get github.com/Masterminds/glide
|
|
||||||
- glide install
|
|
||||||
script:
|
script:
|
||||||
- go test -cover `glide nv`
|
- make ci
|
||||||
- gometalinter --vendor --disable-all \
|
after_success: test -n "$TRAVIS_TAG" && go run main.go
|
||||||
--enable=deadcode \
|
|
||||||
--enable=ineffassign \
|
|
||||||
--enable=gosimple \
|
|
||||||
--enable=staticcheck \
|
|
||||||
--enable=gofmt \
|
|
||||||
--enable=goimports \
|
|
||||||
--enable=dupl \
|
|
||||||
--enable=misspell \
|
|
||||||
--enable=errcheck \
|
|
||||||
--deadline=2m \
|
|
||||||
./...
|
|
||||||
after_success:
|
|
||||||
test ! -z "$TRAVIS_TAG" && go run main.go
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
SOURCE_FILES?=$$(glide novendor)
|
||||||
|
TEST_PATTERN?=.
|
||||||
|
TEST_OPTIONS?=
|
||||||
|
|
||||||
|
setup: ## Install all the build and lint dependencies
|
||||||
|
@go get -u github.com/alecthomas/gometalinter
|
||||||
|
@go get -u github.com/Masterminds/glide
|
||||||
|
@glide install
|
||||||
|
@gometalinter --install
|
||||||
|
|
||||||
|
test: ## Run all the tests
|
||||||
|
@go test $(TEST_OPTIONS) -cover $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s
|
||||||
|
|
||||||
|
lint: ## Run all the linters
|
||||||
|
@gometalinter --vendor --disable-all \
|
||||||
|
--enable=deadcode \
|
||||||
|
--enable=ineffassign \
|
||||||
|
--enable=gosimple \
|
||||||
|
--enable=staticcheck \
|
||||||
|
--enable=gofmt \
|
||||||
|
--enable=goimports \
|
||||||
|
--enable=dupl \
|
||||||
|
--enable=misspell \
|
||||||
|
--enable=errcheck \
|
||||||
|
--enable=vet \
|
||||||
|
--enable=vetshadow \
|
||||||
|
--deadline=20s \
|
||||||
|
./...
|
||||||
|
|
||||||
|
ci: lint test ## Run all the tests and code checks
|
||||||
|
|
||||||
|
build: ## Build a beta version of releaser
|
||||||
|
@go build
|
||||||
|
|
||||||
|
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
||||||
|
help:
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := build
|
||||||
@@ -82,7 +82,7 @@ You may want to wire this to auto-deploy your new tags on travis, for example:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
after_success:
|
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
|
## How the end result looks like
|
||||||
|
|||||||
Reference in New Issue
Block a user