blob: 722e2408512ed8b46cc8f667f1b1ea4dcdbff0c2 [file] [log] [blame]
David Ostrovskyfa189072016-11-30 08:52:06 +01001package(default_visibility = ["//visibility:public"])
2
David Ostrovsky26f8da82016-12-24 09:29:33 +01003load("//tools/bzl:genrule2.bzl", "genrule2")
David Ostrovskyfa189072016-11-30 08:52:06 +01004load("//tools/bzl:pkg_war.bzl", "pkg_war")
David Ostrovskye0f23b92016-08-28 16:01:30 +02005
Han-Wen Nienhuysdc255122016-10-24 13:03:32 +02006genrule(
David Ostrovskyfa189072016-11-30 08:52:06 +01007 name = "gen_version",
8 outs = ["version.txt"],
9 cmd = ("cat bazel-out/volatile-status.txt bazel-out/stable-status.txt | " +
10 "grep STABLE_BUILD_GERRIT_LABEL | cut -d ' ' -f 2 > $@"),
11 stamp = 1,
12 visibility = ["//visibility:public"],
David Ostrovskye0f23b92016-08-28 16:01:30 +020013)
David Ostrovskyf6b7d4a2016-08-28 20:54:50 +020014
Yuxuan 'fishy' Wang14fdf932016-09-30 07:59:54 +080015genrule(
David Ostrovskyfa189072016-11-30 08:52:06 +010016 name = "LICENSES",
17 srcs = ["//Documentation:licenses.txt"],
18 outs = ["LICENSES.txt"],
19 cmd = "cp $< $@",
20 visibility = ["//visibility:public"],
Yuxuan 'fishy' Wang14fdf932016-09-30 07:59:54 +080021)
22
David Ostrovskyfa189072016-11-30 08:52:06 +010023pkg_war(name = "gerrit")
David Ostrovsky9413ff82016-10-25 00:02:17 +020024
David Ostrovskyfa189072016-11-30 08:52:06 +010025pkg_war(
26 name = "headless",
27 ui = None,
28)
29
30pkg_war(
31 name = "polygerrit",
32 ui = "polygerrit",
33)
34
35pkg_war(
36 name = "release",
37 context = ["//plugins:core"],
38 doc = True,
39 ui = "ui_optdbg_r",
40)
41
42pkg_war(
43 name = "withdocs",
44 doc = True,
45)
David Ostrovsky26f8da82016-12-24 09:29:33 +010046
47API_DEPS = [
David Pursehouse9561f382017-02-28 17:32:44 +090048 "//gerrit-acceptance-framework:acceptance-framework_deploy.jar",
49 "//gerrit-acceptance-framework:liblib-src.jar",
50 "//gerrit-acceptance-framework:acceptance-framework-javadoc",
51 "//gerrit-extension-api:extension-api_deploy.jar",
52 "//gerrit-extension-api:libapi-src.jar",
53 "//gerrit-extension-api:extension-api-javadoc",
54 "//gerrit-plugin-api:plugin-api_deploy.jar",
55 "//gerrit-plugin-api:plugin-api-sources_deploy.jar",
56 "//gerrit-plugin-api:plugin-api-javadoc",
57 "//gerrit-plugin-gwtui:gwtui-api_deploy.jar",
58 "//gerrit-plugin-gwtui:gwtui-api-source_deploy.jar",
59 "//gerrit-plugin-gwtui:gwtui-api-javadoc",
David Ostrovsky26f8da82016-12-24 09:29:33 +010060]
61
62genrule2(
David Pursehouse9561f382017-02-28 17:32:44 +090063 name = "api",
David Ostrovsky26f8da82016-12-24 09:29:33 +010064 testonly = 1,
David Pursehouse9561f382017-02-28 17:32:44 +090065 srcs = API_DEPS,
66 outs = ["api.zip"],
67 cmd = " && ".join([
68 "cp $(SRCS) $$TMP",
69 "cd $$TMP",
70 "zip -qr $$ROOT/$@ .",
David Ostrovsky26f8da82016-12-24 09:29:33 +010071 ]),
David Ostrovsky26f8da82016-12-24 09:29:33 +010072)