Fix makefile.
This commit is contained in:
parent
839ea036c2
commit
5cc74e7443
2 changed files with 22 additions and 27 deletions
24
Makefile
24
Makefile
|
|
@ -1,23 +1,27 @@
|
|||
GOLANGCI_LINT_VERSION ?= 1.51.1
|
||||
GOPATH ?= $(shell $$(go env GOPATH))
|
||||
|
||||
/go/bin/golangci-lint:
|
||||
GOLANGCI_LINT_PATH := $(GOPATH)/bin/golangci-lint
|
||||
GOLANGCI_LINT_VERSION := 1.51.1
|
||||
|
||||
|
||||
${GOLANGCI_LINT_PATH}:
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOPATH}/bin v${GOLANGCI_LINT_VERSION}
|
||||
|
||||
build-cli:
|
||||
install-cli:
|
||||
go install ./cli/battlesnake
|
||||
.PHONY: cli
|
||||
|
||||
test: test-format test-lint test-unit
|
||||
.PHONY: test
|
||||
.PHONY: install-cli
|
||||
|
||||
test-format:
|
||||
test -z $(gofmt -l .) || (gofmt -l . && exit 1)
|
||||
test -z $$(gofmt -l .) || (gofmt -l . && exit 1)
|
||||
.PHONY: test-format
|
||||
|
||||
test-lint: /go/bin/golangci-lint
|
||||
/go/bin/golangci-lint run -v ./...
|
||||
test-lint: ${GOLANGCI_LINT_PATH}
|
||||
golangci-lint run -v ./...
|
||||
.PHONY: test-lint
|
||||
|
||||
test-unit:
|
||||
go test -race ./...
|
||||
.PHONY: test-unit
|
||||
|
||||
test: test-format test-lint test-unit
|
||||
.PHONY: test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue