Extend gerrit_plugin() with manifest_entries
Change-Id: I7648972696e2e27ef7da0a9b9f0b01a3e61810a7
This commit is contained in:
parent
20035a4dc9
commit
1f5813e89e
@ -118,6 +118,7 @@ def gerrit_extension(
|
|||||||
srcs = [],
|
srcs = [],
|
||||||
resources = [],
|
resources = [],
|
||||||
manifest_file = None,
|
manifest_file = None,
|
||||||
|
manifest_entries = [],
|
||||||
visibility = ['PUBLIC']):
|
visibility = ['PUBLIC']):
|
||||||
gerrit_plugin(
|
gerrit_plugin(
|
||||||
name = name,
|
name = name,
|
||||||
@ -125,6 +126,7 @@ def gerrit_extension(
|
|||||||
srcs = srcs,
|
srcs = srcs,
|
||||||
resources = resources,
|
resources = resources,
|
||||||
manifest_file = manifest_file,
|
manifest_file = manifest_file,
|
||||||
|
manifest_entries = manifest_entries,
|
||||||
type = 'extension',
|
type = 'extension',
|
||||||
visibility = visibility,
|
visibility = visibility,
|
||||||
)
|
)
|
||||||
@ -135,6 +137,7 @@ def gerrit_plugin(
|
|||||||
srcs = [],
|
srcs = [],
|
||||||
resources = [],
|
resources = [],
|
||||||
manifest_file = None,
|
manifest_file = None,
|
||||||
|
manifest_entries = [],
|
||||||
type = 'plugin',
|
type = 'plugin',
|
||||||
visibility = ['PUBLIC']):
|
visibility = ['PUBLIC']):
|
||||||
mf_cmd = 'v=$(git describe HEAD);'
|
mf_cmd = 'v=$(git describe HEAD);'
|
||||||
@ -146,6 +149,8 @@ def gerrit_plugin(
|
|||||||
mf_cmd += 'echo "Manifest-Version: 1.0" >$OUT;'
|
mf_cmd += 'echo "Manifest-Version: 1.0" >$OUT;'
|
||||||
mf_cmd += 'echo "Gerrit-ApiType: %s" >>$OUT;' % type
|
mf_cmd += 'echo "Gerrit-ApiType: %s" >>$OUT;' % type
|
||||||
mf_cmd += 'echo "Implementation-Version: $v" >>$OUT'
|
mf_cmd += 'echo "Implementation-Version: $v" >>$OUT'
|
||||||
|
for line in manifest_entries:
|
||||||
|
mf_cmd += ';echo "%s" >> $OUT' % line
|
||||||
genrule(
|
genrule(
|
||||||
name = name + '__manifest',
|
name = name + '__manifest',
|
||||||
cmd = mf_cmd,
|
cmd = mf_cmd,
|
||||||
|
Loading…
Reference in New Issue
Block a user