Files
gerrit/lib/codemirror/BUCK
Shawn Pearce 7654c61385 Update CodeMirror to latest tip of master
Change-Id: I3098b8bda449db13adb8b525049b0504c6aff4fd
2013-07-09 11:14:50 -07:00

44 lines
997 B
Python

include_defs('//lib/maven.defs')
VERSION = 'c921c10de6'
SHA1 = '01e57345c77d7f3b401a9a744c325560802b73b3'
URL = GERRIT + 'net/codemirror/codemirror-%s.zip' % VERSION
prebuilt_jar(
name = 'codemirror',
binary_jar = genfile('codemirror.jar'),
deps = [
':jar',
'//lib:LICENSE-codemirror',
],
visibility = ['PUBLIC'],
)
# TODO(sop) Repackage by license boundaries.
# TODO(sop) Minify with Closure JS compiler.
genrule(
name = 'jar',
cmd = ';'.join([
'cd $TMP',
'mkdir net META-INF',
'unzip -d net $SRCS',
'mv net/codemirror-%s net/codemirror' % VERSION,
'echo "Manifest-Version: 1.0" >META-INF/MANIFEST.MF',
'zip -r $OUT *'
]),
srcs = [genfile('codemirror-' + VERSION + '.zip')],
deps = [':download'],
out = 'codemirror.jar',
)
genrule(
name = 'download',
cmd = '${//tools:download_file}' +
' -o $OUT' +
' -u ' + URL +
' -v ' + SHA1,
srcs = [],
deps = ['//tools:download_file'],
out = 'codemirror-' + VERSION + '.zip',
)