diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-11-16 22:14:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-11-23 14:08:05 +0300 |
commit | 40e4d161fa319a443c2598ddbc74b8ad31220c68 (patch) | |
tree | c5f8c20b135c297c386e9e544f303c991e3b40ab /libbbot/manifest.cxx | |
parent | 5d2f40dbca1ed021eb4586c8f3f5578825e82c57 (diff) |
Add support for package-config task manifest value
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:: |