aboutsummaryrefslogtreecommitdiff
path: root/libbbot/manifest.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbbot/manifest.hxx')
-rw-r--r--libbbot/manifest.hxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/libbbot/manifest.hxx b/libbbot/manifest.hxx
index b981ab4..36f2f5b 100644
--- a/libbbot/manifest.hxx
+++ b/libbbot/manifest.hxx
@@ -131,23 +131,34 @@ namespace bbot
//
strings config;
+ // Regular expressions for detecting warnings in the operation result logs
+ // (in addition to the default list of expressions).
+ // Note: could be quoted.
+ //
+ strings warning_regex;
+
strings
unquoted_config () const;
+ strings
+ unquoted_warning_regex () const;
+
task_manifest (std::string nm,
bpkg::version vr,
bpkg::repository_location rl,
strings tr,
std::string mn,
butl::optional<butl::target_triplet> tg,
- strings cf)
+ strings cf,
+ strings wr)
: name (std::move (nm)),
version (std::move (vr)),
repository (std::move (rl)),
trust (tr),
machine (std::move (mn)),
target (std::move (tg)),
- config (std::move (cf)) {}
+ config (std::move (cf)),
+ warning_regex (std::move (wr)){}
public:
task_manifest () = default; // VC export.
@@ -165,6 +176,12 @@ namespace bbot
//
static void
check_config (const std::string&);
+
+ // Check that a string is a valid (ECMAScript) regular expression. Throw
+ // invalid_argument if that's not the case.
+ //
+ static void
+ check_regex (const std::string&);
};
class LIBBBOT_EXPORT task_response_manifest