Default conditional-publisher to newest plugin format

Change-Id: I09497fdb6b4906c82d33d9b7b67d79beb110628a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
This commit is contained in:
Thanh Ha 2017-06-28 00:38:11 -04:00
parent f2b01f7c5c
commit db05e4041d
No known key found for this signature in database
GPG Key ID: B0CB27E00DA095AA
4 changed files with 15 additions and 4 deletions

View File

@ -27,6 +27,7 @@ the build is complete.
import logging
import pkg_resources
import sys
import xml.etree.ElementTree as XML
import six
@ -5590,10 +5591,11 @@ def conditional_publisher(registry, xml_parent, data):
action_parent = cond_publisher
plugin_info = \
registry.get_plugin_info("Flexible Publish Plugin")
version = pkg_resources.parse_version(plugin_info.get('version',
'0'))
plugin_info = registry.get_plugin_info("Flexible Publish Plugin")
# Note: Assume latest version of plugin is preferred config format
version = pkg_resources.parse_version(
plugin_info.get('version', str(sys.maxsize)))
# XML tag changed from publisher to publisherList in v0.13
# check the plugin version to determine further operations
use_publisher_list = version >= pkg_resources.parse_version("0.13")

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"