1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/Makefile

43 lines
1.2 KiB
Makefile
Raw Normal View History

2017-01-02 12:23:28 +02:00
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
2017-01-02 12:23:28 +02:00
test: ## Run all the tests
go test $(TEST_OPTIONS) -cover $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s
fmt: ## gofmt and goimports all go files
2017-01-30 18:24:32 +02:00
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done
2017-01-02 12:23:28 +02:00
lint: ## Run all the linters
gometalinter --vendor --disable-all \
2017-01-02 17:57:36 +02:00
--enable=deadcode \
--enable=ineffassign \
--enable=gosimple \
--enable=staticcheck \
--enable=gofmt \
--enable=goimports \
--enable=dupl \
--enable=misspell \
--enable=errcheck \
2017-01-02 18:09:38 +02:00
--enable=vet \
--enable=vetshadow \
2017-01-11 18:55:16 +02:00
--deadline=1m \
2017-01-02 17:57:36 +02:00
./...
2017-01-02 12:23:28 +02:00
ci: lint test ## Run all the tests and code checks
build: ## Build a beta version of releaser
go build
2017-01-02 12:23:28 +02:00
# 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}'
2017-01-02 17:57:36 +02:00
.DEFAULT_GOAL := build