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
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:
parent
73e4614b34
commit
af61adb9d1
3 changed files with 17 additions and 1 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- **apple build:** the device-family stop prints short `fix:` lines first (e.g. `fix: apple.ipad: true in storebound.config.ts`); a test proves a stopped build exits non-zero through the ship-step path.
|
||||||
|
|
||||||
## 0.8.77 · 2026-11-08
|
## 0.8.77 · 2026-11-08
|
||||||
|
|
||||||
- **iPhone Duo:** outer and inner files are no longer cut to the first 10: the limit comes from Apple's reference data, and over it nothing changes and nothing is dropped. `apple screenshots --duo-only` writes only the Duo set. `apple cpp` no longer lists creative-assets flags.
|
- **iPhone Duo:** outer and inner files are no longer cut to the first 10: the limit comes from Apple's reference data, and over it nothing changes and nothing is dropped. `apple screenshots --duo-only` writes only the Duo set. `apple cpp` no longer lists creative-assets flags.
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ export async function run(ctx: Ctx): Promise<void> {
|
||||||
const familyBlockers = deviceFamilies.filter(d => d.level === 'blocker');
|
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}` : ''}`);
|
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'))
|
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 scan = discoverTargets(root, config);
|
||||||
const ids = [bundleId, ...scan.extensions.map(t => t.bundleId)];
|
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);
|
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`);
|
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];
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,10 @@ describe('device families (fake App Store Connect + project)', () => {
|
||||||
// the escape hatch passes the check (the run then stops later: no Xcode on this machine)
|
// the escape hatch passes the check (the run then stops later: no Xcode on this machine)
|
||||||
const gap = await capture(() => appleBuild(p.ctx([...argv, '--allow-device-gap']))).catch(e => ({ out: '', err: String((e as Error).message ?? e), exit: 1 }));
|
const gap = await capture(() => appleBuild(p.ctx([...argv, '--allow-device-gap']))).catch(e => ({ out: '', err: String((e as Error).message ?? e), exit: 1 }));
|
||||||
expect(gap.err).not.toContain('stopped before the archive');
|
expect(gap.err).not.toContain('stopped before the archive');
|
||||||
|
// the ship-step path (apple build --yes): a stopped build never exits 0, and the fix is its own short line
|
||||||
|
const sr = await ship('apple build', [...argv, '--yes'], a => appleBuild({ ...p.ctx(argv), args: a }));
|
||||||
|
expect(sr.code).not.toBe(0);
|
||||||
|
expect(sr.err).toMatch(/^fix: apple\.ipad: true in storebound\.config\.ts$/m);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('apple build passes the check with iPad in the project and apple.ipad true; an iPhone-only live version never blocks', async () => {
|
test('apple build passes the check with iPad in the project and apple.ipad true; an iPhone-only live version never blocks', async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue