From 1f5813e89ee07274bb1a2ec6b3018af0b13c6878 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 31 May 2013 20:55:31 +0200 Subject: [PATCH] Extend gerrit_plugin() with manifest_entries Change-Id: I7648972696e2e27ef7da0a9b9f0b01a3e61810a7 --- tools/DEFS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/DEFS b/tools/DEFS index 50d325cdb6..0cf8c502ad 100644 --- a/tools/DEFS +++ b/tools/DEFS @@ -118,6 +118,7 @@ def gerrit_extension( srcs = [], resources = [], manifest_file = None, + manifest_entries = [], visibility = ['PUBLIC']): gerrit_plugin( name = name, @@ -125,6 +126,7 @@ def gerrit_extension( srcs = srcs, resources = resources, manifest_file = manifest_file, + manifest_entries = manifest_entries, type = 'extension', visibility = visibility, ) @@ -135,6 +137,7 @@ def gerrit_plugin( srcs = [], resources = [], manifest_file = None, + manifest_entries = [], type = 'plugin', visibility = ['PUBLIC']): mf_cmd = 'v=$(git describe HEAD);' @@ -146,6 +149,8 @@ def gerrit_plugin( mf_cmd += 'echo "Manifest-Version: 1.0" >$OUT;' mf_cmd += 'echo "Gerrit-ApiType: %s" >>$OUT;' % type mf_cmd += 'echo "Implementation-Version: $v" >>$OUT' + for line in manifest_entries: + mf_cmd += ';echo "%s" >> $OUT' % line genrule( name = name + '__manifest', cmd = mf_cmd,