gerrit/BUILD
David Ostrovsky 930f29e2fd Bazel: Automatically fix lint errors with buildifier
In recent buildifier versions, lint errors can be fixed automatically:

  $ find . \( -name BUILD -o -name "*.bzl" \) -print \
      | xargs buildifier --lint=fix

This commit was created with Buildifier version 0.19.2:

  $ buildifier --version
buildifier version: 0.19.2
buildifier scm revision: d39e4d5c25111527369142f16cdb49aa67707313

Change-Id: I1f06cd4596e794981ccc2d9fc2d1da9b17f3973a
2019-01-08 23:11:59 +01:00

71 lines
1.6 KiB
Python

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 > $@"),
stamp = 1,
)
genrule(
name = "LICENSES",
srcs = ["//Documentation:licenses.txt"],
outs = ["LICENSES.txt"],
cmd = "cp $< $@",
)
pkg_war(name = "gerrit")
pkg_war(
name = "headless",
ui = None,
)
pkg_war(
name = "polygerrit",
ui = "polygerrit",
)
pkg_war(
name = "release",
context = ["//plugins:core"],
doc = True,
ui = "ui_optdbg_r",
)
pkg_war(
name = "withdocs",
doc = True,
)
API_DEPS = [
"//gerrit-acceptance-framework:acceptance-framework_deploy.jar",
"//gerrit-acceptance-framework:liblib-src.jar",
"//gerrit-acceptance-framework:acceptance-framework-javadoc",
"//gerrit-extension-api:extension-api_deploy.jar",
"//gerrit-extension-api:libapi-src.jar",
"//gerrit-extension-api:extension-api-javadoc",
"//gerrit-plugin-api:plugin-api_deploy.jar",
"//gerrit-plugin-api:plugin-api-sources_deploy.jar",
"//gerrit-plugin-api:plugin-api-javadoc",
"//gerrit-plugin-gwtui:gwtui-api_deploy.jar",
"//gerrit-plugin-gwtui:gwtui-api-source_deploy.jar",
"//gerrit-plugin-gwtui:gwtui-api-javadoc",
]
genrule2(
name = "api",
testonly = 1,
srcs = API_DEPS,
outs = ["api.zip"],
cmd = " && ".join([
"cp $(SRCS) $$TMP",
"cd $$TMP",
"zip -qr $$ROOT/$@ .",
]),
)