| 95 | } |
| 96 | |
| 97 | function parseXcresultPathLine(line: string): string | null { |
| 98 | const resultBundleMessage = line.match( |
| 99 | /(?:Writing error result bundle to|Writing result bundle to|Result bundle written to):?\s+(.+?\.xcresult)\s*$/u, |
| 100 | ); |
| 101 | if (resultBundleMessage) { |
| 102 | return resultBundleMessage[1]; |
| 103 | } |
| 104 | |
| 105 | const standalonePath = line.match(/^((?:\/|~\/|\.\.?\/)[^\n]*\.xcresult)\s*$/u); |
| 106 | if (standalonePath && !/\s-[A-Za-z]/u.test(standalonePath[1])) { |
| 107 | return standalonePath[1]; |
| 108 | } |
| 109 | |
| 110 | return null; |
| 111 | } |
| 112 | |
| 113 | export interface EventParserOptions { |
| 114 | operation: XcodebuildOperation; |