David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
| 2 | |
David Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 3 | load("//tools/bzl:genrule2.bzl", "genrule2") |
David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 4 | load("//tools/bzl:pkg_war.bzl", "pkg_war") |
David Ostrovsky | e0f23b9 | 2016-08-28 16:01:30 +0200 | [diff] [blame] | 5 | |
Han-Wen Nienhuys | dc25512 | 2016-10-24 13:03:32 +0200 | [diff] [blame] | 6 | genrule( |
David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 7 | 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 Ostrovsky | e0f23b9 | 2016-08-28 16:01:30 +0200 | [diff] [blame] | 13 | ) |
David Ostrovsky | f6b7d4a | 2016-08-28 20:54:50 +0200 | [diff] [blame] | 14 | |
Yuxuan 'fishy' Wang | 14fdf93 | 2016-09-30 07:59:54 +0800 | [diff] [blame] | 15 | genrule( |
David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 16 | name = "LICENSES", |
| 17 | srcs = ["//Documentation:licenses.txt"], |
| 18 | outs = ["LICENSES.txt"], |
| 19 | cmd = "cp $< $@", |
| 20 | visibility = ["//visibility:public"], |
Yuxuan 'fishy' Wang | 14fdf93 | 2016-09-30 07:59:54 +0800 | [diff] [blame] | 21 | ) |
| 22 | |
David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 23 | pkg_war(name = "gerrit") |
David Ostrovsky | 9413ff8 | 2016-10-25 00:02:17 +0200 | [diff] [blame] | 24 | |
David Ostrovsky | fa18907 | 2016-11-30 08:52:06 +0100 | [diff] [blame] | 25 | pkg_war( |
| 26 | name = "headless", |
| 27 | ui = None, |
| 28 | ) |
| 29 | |
| 30 | pkg_war( |
| 31 | name = "polygerrit", |
| 32 | ui = "polygerrit", |
| 33 | ) |
| 34 | |
| 35 | pkg_war( |
| 36 | name = "release", |
| 37 | context = ["//plugins:core"], |
| 38 | doc = True, |
| 39 | ui = "ui_optdbg_r", |
| 40 | ) |
| 41 | |
| 42 | pkg_war( |
| 43 | name = "withdocs", |
| 44 | doc = True, |
| 45 | ) |
David Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 46 | |
| 47 | API_DEPS = [ |
David Pursehouse | 9561f38 | 2017-02-28 17:32:44 +0900 | [diff] [blame] | 48 | "//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 Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 60 | ] |
| 61 | |
| 62 | genrule2( |
David Pursehouse | 9561f38 | 2017-02-28 17:32:44 +0900 | [diff] [blame] | 63 | name = "api", |
David Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 64 | testonly = 1, |
David Pursehouse | 9561f38 | 2017-02-28 17:32:44 +0900 | [diff] [blame] | 65 | srcs = API_DEPS, |
| 66 | outs = ["api.zip"], |
| 67 | cmd = " && ".join([ |
| 68 | "cp $(SRCS) $$TMP", |
| 69 | "cd $$TMP", |
| 70 | "zip -qr $$ROOT/$@ .", |
David Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 71 | ]), |
David Ostrovsky | 26f8da8 | 2016-12-24 09:29:33 +0100 | [diff] [blame] | 72 | ) |