forked from pipe-cd/pipecd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (57 loc) · 1.54 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
65
66
67
68
69
70
71
72
73
74
BAZEL_FLAGS =
BAZEL_COMMAND_FLAGS =
CLOUDSDK_PYTHON = "/usr/bin/python"
ifdef EXTENDED_BAZEL_RC
BAZEL_FLAGS += --bazelrc=${EXTENDED_BAZEL_RC}
endif
ifdef IS_CI
BAZEL_FLAGS += --output_base=/workspace/bazel_out
BAZEL_COMMAND_FLAGS += --config=ci
endif
ifdef BUILD_PLATFORM
BAZEL_COMMAND_FLAGS += --config=${BUILD_PLATFORM}
endif
ifdef PHTHON_PATH
CLOUDSDK_PYTHON=${PHTHON_PATH}
endif
.PHONY: build
build:
bazelisk ${BAZEL_FLAGS} build ${BAZEL_COMMAND_FLAGS} -- //...
.PHONY: test
test:
bazelisk ${BAZEL_FLAGS} test ${BAZEL_COMMAND_FLAGS} -- //pkg/...
.PHONY: test-debug
test-debug:
bazelisk ${BAZEL_FLAGS} test ${BAZEL_COMMAND_FLAGS} --test_output=all -- //pkg/...
.PHONY: test-integration
test-integration:
bazelisk ${BAZEL_FLAGS} test ${BAZEL_COMMAND_FLAGS} --action_env=CLOUDSDK_PYTHON=${CLOUDSDK_PYTHON} -- //test/integration/...
.PHONY: coverage
coverage:
bazelisk ${BAZEL_FLAGS} coverage ${BAZEL_COMMAND_FLAGS} //pkg/...
.PHONY: dep
dep:
GO111MODULE=on go mod tidy
GO111MODULE=on go mod vendor
bazelisk run //:gazelle -- update-repos -from_file=go.mod -prune -to_macro=repositories.bzl%go_repositories
.PHONY: gazelle
gazelle:
bazelisk run //:gazelle
.PHONY: buildifier
buildifier:
bazelisk run //:buildifier
.PHONY: clean
clean:
bazelisk clean --expunge
.PHONY: expose-generated-go
expose-generated-go:
./hack/expose-generated-go.sh pipe-cd pipe
.PHONY: site
site:
hugo server --source=docs
.PHONY: web-dep
web-dep:
bazelisk build //pkg/app/web:build_api //pkg/app/web:build_model
.PHONY: web-dev
web-dev:
cd pkg/app/web; yarn dev