This repository has been archived by the owner on May 27, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from getantibody/makefile
adding makefile
- Loading branch information
Showing
12 changed files
with
95 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
language: go | ||
go: 1.7.4 | ||
install: | ||
- go get github.com/Masterminds/glide | ||
- go get github.com/pierrre/gotestcover | ||
- go get github.com/mattn/goveralls | ||
- go get golang.org/x/tools/cmd/cover | ||
- glide install | ||
script: gotestcover -race -coverprofile=coverage.out $(glide novendor) | ||
install: make setup | ||
script: make ci | ||
after_success: | ||
- go get github.com/mattn/goveralls | ||
- goveralls -coverprofile=coverage.out -service=travis-ci -repotoken="$COVERALLS_TOKEN" | ||
- test -n "$TRAVIS_TAG" && gem install fpm && go get github.com/goreleaser/goreleaser && goreleaser | ||
- go get github.com/goreleaser/goreleaser | ||
- test -n "$TRAVIS_TAG" && goreleaser | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
SOURCE_FILES?=$$(glide novendor) | ||
TEST_PATTERN?=. | ||
TEST_OPTIONS?=-race | ||
|
||
setup: ## Install all the build and lint dependencies | ||
@go get -u github.com/alecthomas/gometalinter | ||
@go get -u github.com/pierrre/gotestcover | ||
@go get -u golang.org/x/tools/cmd/cover | ||
@go get -u github.com/Masterminds/glide | ||
@glide install | ||
@gometalinter --install | ||
|
||
test: ## Run all the tests | ||
@gotestcover $(TEST_OPTIONS) -coverprofile=coverage.out $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=30s | ||
|
||
fmt: ## gofmt and goimports all go files | ||
find . -name '*.go' -not -wholename './vendor/*' | while read -r file; do gofmt -w -s "$$file"; goimports -w "$$file"; done | ||
|
||
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=1m \ | ||
./... | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters