blob: 666ad85c59f006bcfd548db5ef7b38799d4d3219 [file] [log] [blame]
CORE = [
'commit-message-length-validator',
'replication',
'reviewnotes',
]
def filter(names):
from os import path
h, n = [], []
for p in names:
if path.exists(path.join(get_base_path(), p, 'BUCK')):
h.append(p)
else:
n.append(p)
return h, n
HAVE, NEED = filter(CORE)
genrule(
name = 'core',
cmd = '' +
';'.join(['echo >&2 plugins/'+n+' is required.' for n in NEED]) +
(';echo >&2;exit 1;' if NEED else '') +
'mkdir -p $TMP/WEB-INF/plugins &&' +
'for s in $SRCS;do ln -s $s $TMP/WEB-INF/plugins;done;' +
'cd $TMP &&' +
'zip -qr $OUT .',
srcs = [genfile('%s/%s.jar' % (n,n)) for n in CORE],
deps = ['//plugins/%s:%s' %(n,n) for n in HAVE],
out = 'core.zip',
visibility = ['//:release'],
)