( executor: CommandExecutor, )
| 71 | } as const); |
| 72 | |
| 73 | export function createBuildDeviceExecutor( |
| 74 | executor: CommandExecutor, |
| 75 | ): StreamingExecutor<BuildDeviceParams, BuildDeviceResult> { |
| 76 | return async (params, ctx) => { |
| 77 | const platform = mapDevicePlatform(params.platform); |
| 78 | const processedParams = { |
| 79 | ...params, |
| 80 | configuration: params.configuration ?? 'Debug', |
| 81 | }; |
| 82 | const started = createDomainStreamingPipeline('build_device', 'BUILD', ctx, 'build-result'); |
| 83 | |
| 84 | const buildResult = await executeXcodeBuildCommand( |
| 85 | processedParams, |
| 86 | { |
| 87 | platform, |
| 88 | logPrefix: `${platform} Device Build`, |
| 89 | }, |
| 90 | params.preferXcodebuild ?? false, |
| 91 | 'build', |
| 92 | executor, |
| 93 | undefined, |
| 94 | started.pipeline, |
| 95 | ); |
| 96 | |
| 97 | return createBuildDomainResult({ |
| 98 | started, |
| 99 | succeeded: !buildResult.isError, |
| 100 | target: 'device', |
| 101 | artifacts: { |
| 102 | buildLogPath: started.pipeline.logPath, |
| 103 | }, |
| 104 | fallbackErrorMessages: collectFallbackErrorMessages(started, [], buildResult.content), |
| 105 | request: createBuildDeviceRequest(params), |
| 106 | }); |
| 107 | }; |
| 108 | } |
| 109 | |
| 110 | export async function buildDeviceLogic( |
| 111 | params: BuildDeviceParams, |
no test coverage detected