-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 683 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 683 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
GO=go
GOFLAGS=-mod=vendor -trimpath
COV_PROFILE=coverage.txt
TEMPL=templ
export CGO_ENABLED=0
.DEFAULT_GOAL := build
.PHONY: fmt vet test install build cover clean serve templ
templ:
@$(TEMPL) generate
fmt: templ
@$(GO) fmt ./...
vet: fmt
@$(GO) vet ./...
test: vet
@$(GO) clean -testcache
@$(GO) test ./... -v
install: test
@$(GO) install ./...
build: test
@$(GO) build -C ./cmd/tqweb $(GOFLAGS) -o ../../tqweb
cover:
@$(GO) test -coverprofile=$(COV_PROFILE) -covermode=atomic ./...
@$(GO) tool cover -html=$(COV_PROFILE)
clean:
@$(GO) clean github.com/mdm-code/tqweb/...
@$(GO) mod tidy
@$(GO) clean -testcache
@rm -f $(COV_PROFILE)
serve: build
@./tqweb