play build: find the Android SDK like Android Studio (ANDROID_HOME, ANDROID_SDK_ROOT, sdk.dir, default folder), pass it in the env, stop before Gradle when missing; doctor shows it. apple upload: size, per-part lines, 20 s heartbeat (api, altool, processing wait), per-part and per-call timeouts, --timeout exits 7 with the resume hint. Pitfall 25
This commit is contained in:
parent
366362d62b
commit
fc524cd2d4
15 changed files with 460 additions and 34 deletions
|
|
@ -13,10 +13,13 @@ const ROOT = join(import.meta.dir, '..');
|
|||
const CLI = join(ROOT, 'cli/index.ts');
|
||||
const tmp = mkdtempSync(join(tmpdir(), 'sb-web-'));
|
||||
afterAll(() => rmSync(tmp, { recursive: true, force: true }));
|
||||
// play build needs an Android SDK before Gradle runs (cli/lib/tools.ts resolveAndroidSdk): an empty stand-in
|
||||
const SDK = join(tmp, 'android-sdk');
|
||||
mkdirSync(join(SDK, 'platform-tools'), { recursive: true });
|
||||
const touch = (base: string, rel: string, text = ''): void => { mkdirSync(join(base, rel, '..'), { recursive: true }); writeFileSync(join(base, rel), text); };
|
||||
const age = (base: string, rel: string, ms: number): void => { const t = new Date(ms); utimesSync(join(base, rel), t, t); };
|
||||
const sb = (cwd: string, ...args: string[]) => Bun.spawnSync([process.execPath, CLI, ...args], { cwd, stdout: 'pipe', stderr: 'pipe', stdin: 'ignore',
|
||||
env: { ...process.env, ASC_KEY_ID: '', ASC_ISSUER_ID: '', ASC_P8: '', PLAY_SERVICE_ACCOUNT: '', ANDROID_KEYSTORE: '', STOREBOUND_PREBUILD_DONE: '', HOME: join(tmp, 'home') } });
|
||||
env: { ...process.env, ASC_KEY_ID: '', ASC_ISSUER_ID: '', ASC_P8: '', PLAY_SERVICE_ACCOUNT: '', ANDROID_KEYSTORE: '', STOREBOUND_PREBUILD_DONE: '', HOME: join(tmp, 'home'), ANDROID_HOME: SDK, ANDROID_SDK_ROOT: '' } });
|
||||
const text = (r: { stdout: Buffer; stderr: Buffer }) => r.stdout.toString() + r.stderr.toString();
|
||||
|
||||
const BASE = { app: { name: 'Example', privacyPolicyUrl: 'https://example.com/p', supportUrl: 'https://example.com', website: 'https://example.com', contactEmail: 'hi@example.com' },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue