diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-29 18:39:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-10-31 19:13:24 +0300 |
commit | b3633d94b0ec44575c7bbc0a741bf0e388beba72 (patch) | |
tree | 65433d99e6e95782ff0805ae18afcbaf2ba726e5 /libbbot/manifest.cxx | |
parent | 3b154abeabf1563c098a3296f4981ce86ec5b07f (diff) |
Add support for environment task manifest value
Diffstat (limited to 'libbbot/manifest.cxx')
-rw-r--r-- | libbbot/manifest.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx index a815f39..aa9d508 100644 --- a/libbbot/manifest.cxx +++ b/libbbot/manifest.cxx @@ -546,6 +546,16 @@ namespace bbot bad_value (string ("invalid task target: ") + e.what ()); } } + else if (n == "environment") + { + if (environment) + bad_name ("task environment redefinition"); + + if (v.empty ()) + bad_value ("empty task environment"); + + environment = move (v); + } else if (n == "config") { if (!config.empty ()) @@ -634,6 +644,9 @@ namespace bbot s.next ("machine", machine); s.next ("target", target.string ()); + if (environment) + s.next ("environment", *environment); + // Serialize an optional value of the strings type as a space-separated // string list. // |