apple build: short fix lines first in the device-family stop; test: a stopped build exits non-zero
All checks were successful
ci / gate (push) Successful in 2s
ci / ci (push) Successful in 1m22s
ci / linux (push) Successful in 8m5s
ci / windows (push) Successful in 9m36s
ci / acceptance (bun, 22, ubuntu-22.04, Linux, bun) (push) Successful in 40s
ci / acceptance (bun, 22, windows, Windows, bun) (push) Successful in 1m2s
ci / acceptance (node20, 20, ubuntu-22.04, Linux, node) (push) Successful in 1m55s
ci / acceptance (node22, 22, ubuntu-22.04, Linux, node) (push) Successful in 2m2s
ci / record (push) Successful in 13s
ci / dev (push) Successful in 1m33s
ci / acceptance (node20, 20, windows, Windows, node) (push) Successful in 8m24s
ci / acceptance (node22, 22, windows, Windows, node) (push) Successful in 8m19s

This commit is contained in:
CRTkafa 2026-11-16 22:11:56 +07:00
parent 73e4614b34
commit af61adb9d1
3 changed files with 17 additions and 1 deletions

View file

@ -201,7 +201,7 @@ export async function run(ctx: Ctx): Promise<void> {
const familyBlockers = deviceFamilies.filter(d => d.level === 'blocker');
for (const d of deviceFamilies) if (d.level === 'warn' || (d.level === 'blocker' && (dry || a.has('allow-device-gap')))) warn(TAG, `${d.msg}${d.fix ? ` -> ${d.fix}` : ''}`);
if (familyBlockers.length && !dry && !a.has('allow-device-gap'))
throw new Error(`stopped before the archive: ${familyBlockers.map(d => `${d.msg}. Fix: ${d.fix}`).join('\n')}\n(--allow-device-gap builds anyway)`);
throw new Error(`${familyFixLines(familyBlockers, config.apple?.ipad).join('\n')}\nstopped before the archive: ${familyBlockers.map(d => `${d.msg}. Fix: ${d.fix}`).join('\n')}\n(--allow-device-gap builds anyway)`);
const scan = discoverTargets(root, config);
const ids = [bundleId, ...scan.extensions.map(t => t.bundleId)];
@ -313,3 +313,13 @@ export async function run(ctx: Ctx): Promise<void> {
if (json) printJson(result);
done(TAG, `${relative(root, result.ipa)}: ${info.bundleId} ${info.version} (${info.build}). Next: storebound apple upload ${relative(root, result.ipa)} --dry`);
}
/** Short "fix:" lines put first in the device-family stop, so a truncated or piped log still shows the fix. Pure. */
export function familyFixLines(blockers: { msg: string }[], ipad: boolean | undefined): string[] {
const out = new Set<string>();
for (const b of blockers) {
if (/TARGETED_DEVICE_FAMILY = 1\b|no iPad\)/.test(b.msg)) out.add('fix: TARGETED_DEVICE_FAMILY "1,2" in the Xcode project (Supported Destinations: add iPad)');
if (ipad !== true && /iPad/.test(b.msg)) out.add('fix: apple.ipad: true in storebound.config.ts');
}
return [...out];
}