-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (38 loc) · 969 Bytes
/
Makefile
File metadata and controls
47 lines (38 loc) · 969 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
43
44
45
46
47
PROJECT = sciuro
MODULE = github.com/cloudflare/$(PROJECT)
.PHONY: default
default: build;
.PHONY: clean
clean:
@echo cleaning build targets
@rm -rf bin coverage.txt
.PHONY: clean-bazel
clean-bazel:
@echo cleaning bazel build targets
@./tools/bazel clean
.PHONY: check
check:
@echo running checks
# TODO: Not well incorporated into bazel
@golangcilint run ./...
.PHONY: dep-fix
dep-fix:
@echo fixing dependencies
@./tools/bazel run //:gazelle -- fix
.PHONY: dep-update
dep-update: go.sum
@echo updating dependencies
@go mod tidy
@./tools/bazel run //:gazelle -- update-repos -from_file=go.mod -prune=true -to_macro=gazelle.bzl%deps
.PHONY: test
test:
@echo unit testing with Bazel
@./tools/bazel test //...
.PHONY: test-coverage
test-coverage:
@echo unit testing with coverage
@go test -coverprofile=coverage.txt -mod=readonly -covermode=atomic $(MODULE)/...
.PHONY: build
build:
@echo building cmds and images
@./tools/bazel build //cmd/...