diff options
Diffstat (limited to 'libbbot/manifest.cxx')
-rw-r--r-- | libbbot/manifest.cxx | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index 5b9de22..e2534c2 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -665,15 +665,23 @@ namespace bbot environment = move (v); } - else if (n == "config") + else if (n == "config" || // @@ TMP Until toolchain 0.16.0 is released. + n == "target-config") { - if (!config.empty ()) - bad_name ("task configuration redefinition"); + if (!target_config.empty ()) + bad_name ("task target configuration redefinition"); - config = parse_tab (v, [](const string&){}, "configuration"); + target_config = parse_tab (v, [](const string&){}, "configuration"); - if (config.empty ()) - bad_value ("empty task configuration"); + if (target_config.empty ()) + bad_value ("empty task target configuration"); + } + else if (n == "package-config") + { + if (!package_config.empty ()) + bad_name ("task package configuration redefinition"); + + package_config = move (v); } else if (n == "host") { @@ -829,7 +837,16 @@ namespace bbot } }; - serialize_list ("config", config); + // @@ TMP Always use 'target-config' name and always serialize + // package_config after toolchain 0.16.0 is released. + // + if (!package_config.empty ()) + { + serialize_list ("target-config", target_config); + s.next ("package-config", package_config); + } + else + serialize_list ("config", target_config); if (host) s.next ("host", *host ? "true" : "false"); @@ -846,9 +863,9 @@ namespace bbot } strings task_manifest:: - unquoted_config () const + unquoted_target_config () const { - return string_parser::unquote (config); + return string_parser::unquote (target_config); } strings task_manifest:: |