-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathBUILD.bazel
More file actions
115 lines (105 loc) · 4.1 KB
/
Copy pathBUILD.bazel
File metadata and controls
115 lines (105 loc) · 4.1 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@build_stack_rules_proto//rules:proto_compile_assets.bzl", "proto_compile_assets")
load("@build_stack_rules_proto//rules:proto_gazelle.bzl", "proto_gazelle")
load("//bazel_tools/formatting:biome.bzl", "biome_format")
exports_files([
"rules_proto_config.yaml",
"protobuf_javascript.patch",
])
# ----------------------------------------------------
# Gazelle
# ----------------------------------------------------
#
# -- Gazelle language "walk" ---
#
# -- Gazelle language "go" ---
# gazelle:prefix github.com/bazel-contrib/bcr-frontend
# gazelle:go_generate_proto false
#
# -- Gazelle language "protobuf" ---
# gazelle:proto_language go enable true
#
gazelle_binary(
name = "gazelle-custom",
languages = [
"@bazel_gazelle//language/go",
"@bazel_gazelle//language/proto",
"@build_stack_rules_proto//language/protobuf",
],
visibility = ["//visibility:public"],
)
# ProTip: `bazel run //:gazelle` to update BUILD files
proto_gazelle(
name = "gazelle",
cfgs = ["//:rules_proto_config.yaml"],
external = "static",
gazelle = "//:gazelle-custom",
)
gazelle_binary(
name = "gazelle-bcr",
languages = ["//language/bcr"],
visibility = ["//visibility:public"],
)
bcr_exclude_dirs = [
".*",
"app",
"blaze",
"build",
"cmd",
"language",
"pkg",
"rules",
"thirdparty",
"stardoc_output",
"tools",
]
gazelle(
name = "bcr",
args = [
"--resource-status-set-file=$BUILD_WORKING_DIRECTORY/resources.json",
"--repository-metadata-set-file=$BUILD_WORKING_DIRECTORY/repository-metadata.json",
"--bazel-release-set-file=$BUILD_WORKING_DIRECTORY/bazel-releases.json",
"--pr-author-set-file=$BUILD_WORKING_DIRECTORY/pr-authors.json",
"--registry-root=data/bazel-central-registry",
"--registry-url=https://registry.bazel.build",
"--blacklisted_url=https://netcologne.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.11.0.tar.gz",
"--blacklisted_url=https://netcologne.dl.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.1.0/rules_mjml-v0.1.0.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.0/rules_mjml-v0.2.0.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.1/rules_mjml-v0.2.1.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.2/rules_mjml-v0.2.2.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.3/rules_mjml-v0.2.3.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.5/rules_mjml-v0.2.5.tar.gz",
"--blacklisted_url=https://github.com/mathematic-inc/rules_mjml/releases/download/v0.2.4/rules_mjml-v0.2.4.tar.gz",
"--exclude=.cache", # exists in CI?
"--exclude=$HOME", # exists in CI?
"--exclude=modules",
] + ["--exclude=" + dir for dir in bcr_exclude_dirs],
gazelle = "//:gazelle-bcr",
)
# ProTip: bazel run //:proto_assets (to regenerate .pb.go files)
#
proto_compile_assets(
name = "proto_assets",
deps = [
"//build/stack/bazel/help/v1:bhpb_go_compiled_sources",
"//build/stack/bazel/registry/v1:bzpb_go_compiled_sources",
"//build/stack/bazel/symbol/v1:sympb_go_compiled_sources",
"//build/stack/livegrep/v1:livegrep_go_compiled_sources",
"//build/stack/starlark/v1beta1:v1beta1_go_compiled_sources",
"//builtin:builtin_go_compiled_sources",
"//stardoc_output:stardoc_output_go_compiled_sources",
],
)
# ProTip: `bazel run //:format` to format css,js,html files
#
# NOTE: .soy files have no formatter - ask AI to do it
biome_format(
name = "format",
)
# ProTip: `bazel run //:format.check` to apply additional lint checks, but these
# are just suggestions, they are not madatory.
biome_format(
name = "format.check",
command = "check",
)