-
Notifications
You must be signed in to change notification settings - Fork 214
/
BUILD
79 lines (68 loc) · 1.74 KB
/
BUILD
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
load("//tools/bzl:genrule2.bzl", "genrule2")
load("//tools/bzl:pkg_war.bzl", "pkg_war")
package(default_visibility = ["//visibility:public"])
genrule(
name = "gen_version",
outs = ["version.txt"],
cmd = ("(cat bazel-out/volatile-status.txt bazel-out/stable-status.txt | " +
"grep STABLE_BUILD_GERRIT_LABEL | cut -d ' ' -f 2) > $@ || echo 'UNKNOWN' > $@"),
stamp = 1,
)
genrule(
name = "LICENSES",
srcs = ["//Documentation:licenses.txt"],
outs = ["LICENSES.txt"],
cmd = "cp $< $@",
)
pkg_war(
name = "gerrit",
ui = "polygerrit",
)
pkg_war(
name = "headless",
ui = None,
)
pkg_war(
name = "release",
context = ["//plugins:core"],
doc = True,
)
pkg_war(
name = "withdocs",
doc = True,
)
API_DEPS = [
"//java/com/google/gerrit/acceptance:framework_deploy.jar",
"//java/com/google/gerrit/acceptance:libframework-lib-src.jar",
"//java/com/google/gerrit/extensions:extension-api_deploy.jar",
"//java/com/google/gerrit/extensions:libapi-src.jar",
"//plugins:plugin-api_deploy.jar",
"//plugins:plugin-api-sources_deploy.jar",
]
API_JAVADOC_DEPS = [
"//java/com/google/gerrit/acceptance:framework-javadoc",
"//java/com/google/gerrit/extensions:extension-api-javadoc",
"//plugins:plugin-api-javadoc",
]
genrule2(
name = "api",
testonly = True,
srcs = API_DEPS + API_JAVADOC_DEPS,
outs = ["api.zip"],
cmd = " && ".join([
"cp $(SRCS) $$TMP",
"cd $$TMP",
"zip -qr $$ROOT/$@ .",
]),
)
genrule2(
name = "api-skip-javadoc",
testonly = True,
srcs = API_DEPS,
outs = ["api-skip-javadoc.zip"],
cmd = " && ".join([
"cp $(SRCS) $$TMP",
"cd $$TMP",
"zip -qr $$ROOT/$@ .",
]),
)