diff --git a/Makefile b/Makefile index 2d47cfd..5a18449 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,21 @@ -BUMP_VERSION := $(shell command -v bump_version) -MEGACHECK := $(shell command -v megaccheck) +BUMP_VERSION := $(GOPATH)/bin/bump_version +MEGACHECK := $(GOPATH)/bin/megacheck IGNORES := 'github.com/kevinburke/ssh_config/config.go:U1000 github.com/kevinburke/ssh_config/config.go:S1002 github.com/kevinburke/ssh_config/token.go:U1000' -lint: +$(MEGACHECK): + go get honnef.co/go/tools/cmd/megacheck + +lint: $(MEGACHECK) go vet ./... -ifndef MEGACHECK - go get -u honnef.co/go/tools/cmd/megacheck -endif - megacheck --ignore=$(IGNORES) ./... + $(MEGACHECK) --ignore=$(IGNORES) ./... test: lint @# the timeout helps guard against infinite recursion go test -timeout=50ms ./... -release: -ifndef BUMP_VERSION - go get -u github.com/Shyp/bump_version -endif - bump_version minor config.go +$(BUMP_VERSION): + go get github.com/Shyp/bump_version + +release: $(BUMP_VERSION) + $(BUMP_VERSION) minor config.go