This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
64 lines (51 loc) · 1.55 KB
/
Makefile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
BAZEL_FLAGS=--features=pure --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
.PHONY: all
all: test
.PHONY: test
test:
bazel test //... --test_output=streamed
.PHONY: stress-test
stress-test:
bazel test //... --test_output=streamed --runs_per_test=10
.PHONY: gofmt
gofmt:
gofmt -w -s cmd/ pkg/
.PHONY: goimports
goimports:
goimports -w cmd/ pkg/ test/
.PHONY: push-etcd-manager
push-etcd-manager:
bazel run ${BAZEL_FLAGS} //images:push-etcd-manager
.PHONY: push-etcd-dump
push-etcd-dump:
bazel run ${BAZEL_FLAGS} //images:push-etcd-dump
.PHONY: push-etcd-backup
push-etcd-backup:
bazel run ${BAZEL_FLAGS} //images:push-etcd-backup
.PHONY: push
push: push-etcd-manager push-etcd-dump push-etcd-backup
echo "pushed images"
.PHONY: gazelle
gazelle:
bazel run //:gazelle -- fix
git checkout -- vendor
rm -f vendor/github.com/coreos/etcd/cmd/etcd
#rm vendor/github.com/golang/protobuf/protoc-gen-go/testdata/multi/BUILD.bazel
.PHONY: dep-ensure
dep-ensure:
echo "'make dep-ensure' has been replaced by 'make vendor'"
exit 1
.PHONY: vendor
vendor:
go mod vendor
find vendor/ -name "BUILD" -delete
find vendor/ -name "BUILD.bazel" -delete
bazel run //:gazelle
.PHONY: staticcheck-all
staticcheck-all:
go list ./... | xargs go run honnef.co/go/tools/cmd/staticcheck
# staticcheck-working is the subset of packages that we have cleaned up
# We gradually want to sync up staticcheck-all with staticcheck-working
.PHONY: staticcheck-working
staticcheck-working:
go list ./... | grep -v "etcd-manager/pkg/[cepv]" | xargs go run honnef.co/go/tools/cmd/staticcheck