Skip to content

Commit

Permalink
Add config error for Swift build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Mar 15, 2024
1 parent bddfc7c commit e28ae3a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/cli-errors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/cli-errors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion src/cli-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export enum CliConfigErrorCategory {
NoSourceCodeSeen = "NoSourceCodeSeen",
NoSupportedBuildCommandSucceeded = "NoSupportedBuildCommandSucceeded",
NoSupportedBuildSystemDetected = "NoSupportedBuildSystemDetected",
SwiftBuildFailed = "SwiftBuildFailed",
}

type CliErrorConfiguration = {
Expand Down Expand Up @@ -176,7 +177,7 @@ export const cliErrorsConfig: Record<
},
[CliConfigErrorCategory.MavenBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("[autobuild] [ERROR] Failed to execute goal"),
new RegExp("\\[autobuild\\] \\[ERROR\\] Failed to execute goal"),
],
},
[CliConfigErrorCategory.NoBuildCommandAutodetected]: {
Expand Down Expand Up @@ -224,6 +225,13 @@ export const cliErrorsConfig: Record<
new RegExp("No supported build system detected"),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp(
"\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command",
),
],
},
};

/**
Expand Down

0 comments on commit e28ae3a

Please sign in to comment.