diff --git a/Makefile b/Makefile index ac36868..8087580 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ TEST := go test TEST_FLAGS ?= -v TEST_TARGET ?= ./... -GO111MODULE=on +GO111MODULE = on +PROJECT_NAME := $(shell basename $(PWD)) test: $(TEST) $(TEST_FLAGS) $(TEST_TARGET) -coverprofile: TEST_TARGET := . -coverprofile: TEST_FLAGS += -covermode=count -coverprofile=$(TEST_TARGET).coverprofile -coverprofile: test +coverage: TEST_TARGET := . +coverage: TEST_FLAGS += -covermode=count -coverprofile $(PROJECT_NAME).coverprofile +coverage: test clean: $(RM) -v *.coverprofile