Merge "bazel: build a polygerrit war too."
diff --git a/BUILD b/BUILD
index 7ec32be..5fd38c8 100644
--- a/BUILD
+++ b/BUILD
@@ -20,3 +20,7 @@
pkg_war(name = 'gerrit')
pkg_war(name = 'headless', ui = None)
pkg_war(name = 'release', ui = 'ui_optdbg_r', context = ['//plugins:core'])
+pkg_war(
+ name = "polygerrit",
+ ui = "polygerrit"
+)
diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt
index f063b88..834bcae 100644
--- a/Documentation/dev-bazel.txt
+++ b/Documentation/dev-bazel.txt
@@ -38,15 +38,18 @@
bazel build gerrit
----
-[NOTE]
-PolyGerrit UI not yet working.
-
The output executable WAR will be placed in:
----
bazel-bin/gerrit.war
----
+to run,
+
+----
+ $(bazel info output_base)/external/local_jdk/bin/java \
+ -jar bazel-bin/release.war daemon -d ../gerrit_testsite
+----
=== Headless Mode
diff --git a/plugins/replication b/plugins/replication
index 3212bcd..bc37211 160000
--- a/plugins/replication
+++ b/plugins/replication
@@ -1 +1 @@
-Subproject commit 3212bcd4f2c0dc791a99af97ee98df70746f2306
+Subproject commit bc37211df3cc7b7516974142d78232197c49ce29
diff --git a/tools/bzl/pkg_war.bzl b/tools/bzl/pkg_war.bzl
index aa7d07f..a9d3e2e 100644
--- a/tools/bzl/pkg_war.bzl
+++ b/tools/bzl/pkg_war.bzl
@@ -53,10 +53,11 @@
]
def _make_war(input_dir, output):
- return ''.join([
- '(root=$(pwd) && ',
- 'cd %s && ' % input_dir,
- 'zip -9qr ${root}/%s .)' % (output.path),
+ return '(%s)' % ' && '.join([
+ 'root=$(pwd)',
+ 'cd %s' % input_dir,
+ "find . -exec touch -t 198001010000 '{}' ';' 2> /dev/null",
+ 'zip -9qr ${root}/%s .' % (output.path),
])
def _war_impl(ctx):
@@ -126,8 +127,11 @@
def pkg_war(name, ui = 'ui_optdbg', context = [], **kwargs):
ui_deps = []
- if ui:
+ if ui == 'polygerrit' or ui == 'ui_optdbg' or ui == 'ui_optdbg_r':
+ ui_deps.append('//polygerrit-ui/app:polygerrit_ui')
+ if ui != 'polygerrit':
ui_deps.append('//gerrit-gwtui:%s' % ui)
+
_pkg_war(
name = name,
libs = LIBS,