aboutsummaryrefslogtreecommitdiff
path: root/libbbot/manifest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbbot/manifest.cxx')
-rw-r--r--libbbot/manifest.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/libbbot/manifest.cxx b/libbbot/manifest.cxx
index 89412d7..c52f3e3 100644
--- a/libbbot/manifest.cxx
+++ b/libbbot/manifest.cxx
@@ -243,6 +243,31 @@ namespace bbot
agent = move (v);
}
+ else if (n == "toolchain-name")
+ {
+ if (!toolchain_name.empty ())
+ bad_name ("task request toolchain name redefinition");
+
+ if (v.empty ())
+ bad_value ("empty task request toolchain name");
+
+ toolchain_name = move (v);
+ }
+ else if (n == "toolchain-version")
+ {
+ if (!toolchain_version.empty ())
+ bad_name ("task request toolchain version redefinition");
+
+ try
+ {
+ toolchain_version = standard_version (v);
+ }
+ catch (const invalid_argument& e)
+ {
+ bad_value (string ("invalid task request toolchain version: ") +
+ e.what ());
+ }
+ }
else if (n == "fingerprint")
{
if (fingerprint)
@@ -262,6 +287,12 @@ namespace bbot
if (agent.empty ())
bad_value ("no task request agent specified");
+ if (toolchain_name.empty ())
+ bad_value ("no task request toolchain name specified");
+
+ if (toolchain_version.empty ())
+ bad_value ("no task request toolchain version specified");
+
// Parse machine header manifests.
//
for (nv = p.next (); !nv.empty (); nv = p.next ())
@@ -279,6 +310,8 @@ namespace bbot
//
s.next ("", "1"); // Start of manifest.
s.next ("agent", agent);
+ s.next ("toolchain-name", toolchain_name);
+ s.next ("toolchain-version", toolchain_version.string ());
if (fingerprint)
s.next ("fingerprint", *fingerprint);