f377aa96de
This version includes a lot of new features and improvements, including: * Switched to top-down-building, which should generally make builds faster. The old behavior can be bypassed by passing --deep on the command line [1] * New query command was added (inspired by Bazel) [2] * Performance improvement in file globbing Extend tools/eclipse/project.py to pass the --deep option to ask Buck to execute bottom-up build when generating the Eclipse project. This is needed otherwise after using the buck clean command only the gerrit.war file would be fetched from the cache and the buck-out/gen/lib folder would remain empty. With [3] genrule output is now namespaced with the genrule name. Adapt documentation and references in the code to the new location of Buck artifacts. Because of this change, `buck clean` must be issued after Buck upgrade, otherwise the build would fail. The same prolem exists when switching between branches: `buck clean` must be issued, otherwise the build would fail. Test plan: * buck build release * buck build api_install * buck test * install and verify new gerrit site * upgrade and verify existing gerrit site * reindex existing gerrit site * verify that tools/eclipse/project.py produces sane Eclipse project * verify that unit test execution from Eclipse works * verify that daemon started from Eclipse works * verify that GWT SDM debug session started from Eclipe works [1]217cec33bc
[2] https://buckbuild.com/command/query.html [3]c92ef212b5
Change-Id: Ib3f22e70b7cb9eb9349618f2bcc018bf799c40f8
53 lines
862 B
Python
53 lines
862 B
Python
python_binary(
|
|
name = 'download_file',
|
|
main = 'download_file.py',
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_binary(
|
|
name = 'merge_jars',
|
|
main = 'merge_jars.py',
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_binary(
|
|
name = 'pack_war',
|
|
main = 'pack_war.py',
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_library(
|
|
name = 'util',
|
|
srcs = [
|
|
'util.py',
|
|
'__init__.py'
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_test(
|
|
name = 'util_test',
|
|
srcs = ['util_test.py'],
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
def shquote(s):
|
|
return s.replace("'", "'\\''")
|
|
|
|
def os_path():
|
|
from os import environ
|
|
return environ.get('PATH')
|
|
|
|
genrule(
|
|
name = 'buck',
|
|
cmd = 'echo buck=`which buck`>$OUT;' +
|
|
("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())),
|
|
deps = [],
|
|
out = 'buck.properties',
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|