Add config error for Swift build failures

This commit is contained in:
Henry Mercer 2024-03-15 12:17:49 +00:00
parent bddfc7c6d5
commit e28ae3a84c
3 changed files with 17 additions and 3 deletions

8
lib/cli-errors.js generated
View file

@ -127,6 +127,7 @@ var CliConfigErrorCategory;
CliConfigErrorCategory["NoSourceCodeSeen"] = "NoSourceCodeSeen";
CliConfigErrorCategory["NoSupportedBuildCommandSucceeded"] = "NoSupportedBuildCommandSucceeded";
CliConfigErrorCategory["NoSupportedBuildSystemDetected"] = "NoSupportedBuildSystemDetected";
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
/**
* All of our caught CLI error messages that we handle specially: ie. if we
@ -156,7 +157,7 @@ exports.cliErrorsConfig = {
},
[CliConfigErrorCategory.MavenBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("[autobuild] [ERROR] Failed to execute goal"),
new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
],
},
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
@ -197,6 +198,11 @@ exports.cliErrorsConfig = {
new RegExp("No supported build system detected"),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),
],
},
};
/**
* Check if the given CLI error or exit code, if applicable, apply to any known