apple upload: find the IPA of a build made with --out (build notes it in .storebound/last-apple-build.json; upload --out; the error names every folder searched and the last build's IPA)
This commit is contained in:
parent
ef80cd2760
commit
9a878d6562
6 changed files with 58 additions and 11 deletions
|
|
@ -3,7 +3,7 @@ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { archiveScanDirs, derivedDataFor, leakNeedles, leakProblem, outsideHome, pathFreeSettings, prefixMaps, scanForPaths } from '../cli/lib/path-free';
|
||||
import { archiveArgs, validateAppleBuild } from '../cli/lib/xcode';
|
||||
import { archiveArgs, readLastBuild, recordLastBuild, uploadSearchDirs, validateAppleBuild } from '../cli/lib/xcode';
|
||||
|
||||
const resolve = (p: string): string => (p.startsWith('/') ? p : `/proj/${p}`);
|
||||
const t = { framework: 'native' as const, project: 'App.xcodeproj', scheme: 'App', notes: [] };
|
||||
|
|
@ -102,3 +102,18 @@ describe('leak scan', () => {
|
|||
rmSync(dir, { recursive: true, force: true });
|
||||
});
|
||||
});
|
||||
|
||||
describe('apple upload finds the last build', () => {
|
||||
test('--out wins; else the last build out, then the config out', () => {
|
||||
expect(uploadSearchDirs({ flagOut: '/o', lastOut: '/l', configOut: '/c' })).toEqual([join('/o', 'export')]);
|
||||
expect(uploadSearchDirs({ lastOut: '/l', configOut: '/c' })).toEqual([join('/l', 'export'), join('/c', 'export')]);
|
||||
expect(uploadSearchDirs({ lastOut: '/c', configOut: '/c' })).toEqual([join('/c', 'export')]);
|
||||
});
|
||||
test('build records the IPA and out in .storebound, upload reads it back', () => {
|
||||
const root = mkdtempSync(join(tmpdir(), 'lb-'));
|
||||
expect(readLastBuild(root)).toBeNull();
|
||||
recordLastBuild(root, { ipa: '/shared/out/export/build-31/App.ipa', out: '/shared/out', version: '1.0', build: '31' });
|
||||
expect(readLastBuild(root)).toEqual({ ipa: '/shared/out/export/build-31/App.ipa', out: '/shared/out', version: '1.0', build: '31' });
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue