gitlab.com/prarit/lab@v0.14.0/Makefile (about) 1 VERSION ?= $(shell git describe --long --tags) 2 GOURL ?= github.com/zaquestion/lab 3 4 deps: 5 dep ensure 6 7 build: deps 8 go build -ldflags "-X \"main.version=$(VERSION)\"" $(GOURL) 9 10 install: build 11 go install $(GOURL) 12 13 test: 14 bash -c "trap 'trap - SIGINT SIGTERM ERR; mv testdata/.git testdata/test.git; rm coverage-* 2>&1 > /dev/null; exit 1' SIGINT SIGTERM ERR; $(MAKE) internal-test" 15 16 internal-test: 17 rm coverage-* 2>&1 > /dev/null || true 18 mv testdata/test.git testdata/.git 19 go test -coverprofile=coverage-main.out -covermode=count -coverpkg ./... -run=$(run) $(GOURL)/cmd $(GOURL)/internal/... 20 mv testdata/.git testdata/test.git 21 go get github.com/wadey/gocovmerge 22 gocovmerge coverage-*.out > coverage.txt && rm coverage-*.out 23 24 .PHONY: deps install test internal-test