gerrit/tools/BUCK
Shawn Pearce a7a3ee1e3a Update Buck to latest master
genrule() no longer supports running commands run only for the
side-effect with no output file. Actions like download_sources or
eclipse need to be handled using Python scripts executed from the
user's shell, otherwise Buck fails if caching is enabled.

Change-Id: I361fc20675f211e15e4ab7942ef52778d0a615c2
2013-09-20 19:41:26 -07:00

35 lines
619 B
Python

python_binary(
name = 'download_file',
main = 'download_file.py',
visibility = ['PUBLIC'],
)
python_binary(
name = 'pack_war',
main = 'pack_war.py',
deps = [':util'],
visibility = ['PUBLIC'],
)
python_library(
name = 'util',
srcs = ['util.py'],
visibility = ['PUBLIC'],
)
def shquote(s):
return s.replace("'", "'\\''")
def os_path():
from os import environ
return environ.get('PATH')
genrule(
name = 'buck.properties',
cmd = 'echo buck=`which buck`>$OUT;' +
("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())),
deps = [],
out = 'buck.properties',
visibility = ['PUBLIC'],
)