-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 703 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
override SHELL := /usr/bin/env bash -euxo pipefail
override .DEFAULT_GOAL := all
all: vet lint test
vet: force
@go vet $(VETFLAGS) ./...
lint: force
@go run golang.org/x/lint/golint -set_exit_status $(LINTFLAGS) ./...
test: force
@rm -f coverage.txt
@( \
TEMPFILE=$$(mktemp) && trap 'rm "$${TEMPFILE}"' EXIT && \
go test -coverprofile="$${TEMPFILE}" -covermode=count $(TESTFLAGS) -coverpkg ./cmd/proxyz/... ./cmd/proxyz && \
cat "$${TEMPFILE}" >> coverage.txt \
)
@( \
TEMPFILE=$$(mktemp) && trap 'rm "$${TEMPFILE}"' EXIT && \
go test -coverprofile="$${TEMPFILE}" -covermode=count $(TESTFLAGS) . && \
cat "$${TEMPFILE}" >> coverage.txt \
)
.PHONY: force
force: