-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (25 loc) · 740 Bytes
/
Makefile
File metadata and controls
35 lines (25 loc) · 740 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
MODULES=$(shell go list -f '{{.Dir}}/...' -m)
test:
go test -timeout 1200s -race -cover $(MODULES)
.PHONY: test
update-testdata:
umask 0022 && UPDATE=1 go test $(MODULES)
.PHONY: update-testdata
test-compile:
go test -c -o /dev/null $(MODULES)
.PHONY: test-compile
lint:
go tool golangci-lint run -v $(MODULES)
.PHONY: lint
lint-fix:
go tool golangci-lint run --fix -v $(MODULES)
.PHONY: lint-fix
work-sync:
go work sync
.PHONY: work-sync
tidy: $(MODULES:/...=.tidy) work-sync
%.tidy:
cd $(basename $@) && go mod tidy
bump: $(MODULES:/...=.bump) tidy
%.bump:
cd $(basename $@) && go mod edit -json | jq --raw-output '.Require[] | select(.Path | contains("github.com/Azure/ARO-Tools") ) | .Path' | xargs -I{} go get {}@main