live read run fixes: Xcode-managed profiles in signing, TestFlight-only release trains, scan skips agent worktrees and takes an absolute --config, --all-pages paging meta, iap-submit json, report hints
This commit is contained in:
parent
0856f2d1b2
commit
3a775f7808
15 changed files with 282 additions and 30 deletions
|
|
@ -45,6 +45,11 @@ export async function readSubmitState(c: Asc, appId: string, want: string[]): Pr
|
|||
return { appVersions, iaps, subs, groups, draft };
|
||||
}
|
||||
|
||||
/** The requests a run would send: none when nothing is left to submit (seen live: every product already in review). */
|
||||
export function planRequests<R>(prepare: R[], plan: { items: unknown[]; submit: R }): R[] {
|
||||
return plan.items.length ? [...prepare, plan.submit] : [];
|
||||
}
|
||||
|
||||
export async function run(ctx: Ctx): Promise<void> {
|
||||
const { config, root } = ctx.loaded;
|
||||
const a = ctx.args;
|
||||
|
|
@ -73,7 +78,7 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
const prepare = plan.prepare.map(r => bindIds(r, { app: appId }));
|
||||
if (a.has('json')) {
|
||||
printJson({ dryRun: dry, items: plan.items, skipped: plan.skipped, firstOfType: plan.firstOfType, hasApprovedVersion: plan.hasApprovedVersion,
|
||||
needsAppVersion: plan.needsAppVersion, blockers: plan.blockers, draft: state.draft?.id ?? null, requests: [...prepare, plan.submit].map(r => describeReq(r)) });
|
||||
needsAppVersion: plan.needsAppVersion, blockers: plan.blockers, draft: state.draft?.id ?? null, requests: planRequests(prepare, plan).map(r => describeReq(r)) });
|
||||
if (dry || plan.blockers.length) { if (plan.blockers.length) process.exitCode = 1; return; }
|
||||
} else {
|
||||
for (const it of plan.items) log(TAG, `submit: ${it.label}`);
|
||||
|
|
@ -84,7 +89,7 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
if (plan.blockers.length) { process.exitCode = 1; done(TAG, 'nothing sent: fix the blockers above'); return; }
|
||||
if (!plan.items.length) { done(TAG, 'nothing to submit'); return; }
|
||||
if (dry) {
|
||||
await execute(c.asc, [...prepare, plan.submit], { dry, tag: TAG });
|
||||
await execute(c.asc, planRequests(prepare, plan), { dry, tag: TAG });
|
||||
done(TAG, `dry run: ${plan.items.length} item(s) would go into ${state.draft ? `draft ${state.draft.id}` : 'a new draft submission'}`);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue