-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (49 loc) · 2.6 KB
/
Copy pathMakefile
File metadata and controls
54 lines (49 loc) · 2.6 KB
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
# Makefile for building code and running tests.
########################################################################
# Regenerates the documentation code snippets.
.PHONY: snippets
snippets:
npm run generate-code-snippets --prefix documentation
########################################################################
# Finds all targets that generate `README.md` files, and runs them.
# Keep this lazy (recursive `=`) so unrelated targets (e.g. `make
# snippets`) don't run Bazel query work at parse-time.
README_GENERATOR_TARGETS = $(shell bazel query 'attr(generator_function, write_templated_source_file, //...) intersect attr(name, ".*_md$$", //...)')
.PHONY: readmes
readmes:
$(foreach target,$(README_GENERATOR_TARGETS),bazel run $(target);)
########################################################################
# Regenerates all of the golden files.
.PHONY: goldens
goldens:
bazel build \
//tests/reboot:echo_py_reboot \
//tests/reboot:greeter_js_reboot \
//tests/reboot:greeter_js_reboot_react \
//tests/reboot:greeter_py_reboot \
//tests/reboot:general_boilerplate_py_reboot \
//tests/reboot:echo_boilerplate_py_reboot \
//tests/reboot:general_boilerplate_ts_reboot \
//tests/reboot/routing:sorted_envoy_yaml \
//tests/reboot/routing_filter:envoy_config \
//tests/reboot:greeter_web_ts_reboot \
//reboot/ping:ping_py_reboot
cp bazel-bin/tests/reboot/echo_rbt.py tests/reboot/echo_rbt.golden.py
cp bazel-bin/tests/reboot/greeter_rbt_react.js tests/reboot/greeter_rbt_react.golden.js
cp bazel-bin/tests/reboot/greeter_rbt.py tests/reboot/greeter_rbt.golden.py
cp bazel-bin/tests/reboot/general_servicer.py tests/reboot/general_servicer.golden.py
cp bazel-bin/tests/reboot/echo_servicer.py tests/reboot/echo_servicer.golden.py
cp bazel-bin/tests/reboot/greeter_rbt.js tests/reboot/greeter_rbt.golden.js
cp bazel-bin/tests/reboot/general_servicer.ts tests/reboot/general_servicer.golden.ts
cp bazel-bin/tests/reboot/routing/envoy.sorted.yaml tests/reboot/routing/envoy.sorted.golden.yaml
cp bazel-bin/tests/reboot/routing_filter/envoy.generated.yaml tests/reboot/routing_filter/envoy.golden.yaml
cp bazel-bin/tests/reboot/greeter_rbt_web.js tests/reboot/greeter_rbt_web.golden.js
cp bazel-bin/reboot/ping/ping_api_rbt.py tests/reboot/ping_api_rbt.golden.py
########################################################################
# Updates the `reboot`-pinned Python requirements lockfiles.
.PHONY: requirements
requirements:
bazel run //reboot:requirements.update
bazel run //tests:requirements.update
bazel run //reboot/examples:requirements.update
bazel run //bazel/pip_package_rule:requirements.update