apple.macos listing / review notes per platform + iOS-only claim warnings; apple upload of a .pkg: bounded pkgutil, macOS processing wait, heartbeats; release 409 pattern
This commit is contained in:
parent
53d57544bf
commit
1e47c2ee60
18 changed files with 417 additions and 63 deletions
|
|
@ -20,7 +20,7 @@ import { compactDiff } from '../lib/diff';
|
|||
import { mergeAppleListing, overLimits } from '../lib/listing-pull';
|
||||
import { counts, draftReason, draftSections, type ItemPlan, itemLines, planItem, planLocales, planVersion, short, type Skipped, type VersionPlan } from '../lib/listing-plan';
|
||||
import { createOnce, findOrCreate, getById } from '../lib/upsert';
|
||||
import { appleName } from '../lib/config';
|
||||
import { appleName, listingPathFor } from '../lib/config';
|
||||
import { wantedRelease } from '../lib/release-type';
|
||||
import type { Ctx } from '../lib/ctx';
|
||||
import { confirm, need } from '../lib/ctx';
|
||||
|
|
@ -29,10 +29,10 @@ import { ascClient, EDITABLE, type J, noAppInfo } from './asc';
|
|||
import { stdinIsTTY } from '../lib/tty';
|
||||
import { allVersions, type AscPlatform, parsePlatform, pickPlatform, platformLabel, versionsPath } from './platform';
|
||||
|
||||
export function readAppleCopy(ctx: Ctx) {
|
||||
export function readAppleCopy(ctx: Ctx, platform?: string) {
|
||||
const { config, resolve } = ctx.loaded;
|
||||
const only = ctx.args.list('only');
|
||||
const all = parseAppStoreListing(readFileSync(resolve(config.apple?.listing ?? 'store/appstore.md'), 'utf8'));
|
||||
const all = parseAppStoreListing(readFileSync(resolve(listingPathFor(config, platform)), 'utf8'));
|
||||
return Object.fromEntries(Object.entries(all).filter(([l]) => !only.length || only.includes(l)));
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ async function pull(ctx: Ctx): Promise<void> {
|
|||
const at = l.attributes;
|
||||
remote[at.locale] = { ...remote[at.locale], description: at.description ?? undefined, keywords: at.keywords ?? undefined, promotionalText: at.promotionalText ?? undefined, whatsNew: at.whatsNew ?? undefined };
|
||||
}
|
||||
const file = resolve(config.apple?.listing ?? 'store/appstore.md');
|
||||
const file = resolve(listingPathFor(config, platform));
|
||||
const before = existsSync(file) ? readFileSync(file, 'utf8') : '# App Store listing copy\n\nPulled from App Store Connect by `storebound apple listing pull`.\n';
|
||||
const r = mergeAppleListing(before, remote, appleName(config));
|
||||
const over = overLimits(r.changes, 'apple');
|
||||
|
|
@ -104,8 +104,8 @@ type Asc = Awaited<ReturnType<typeof ascClient>>;
|
|||
async function planListing(ctx: Ctx, c: Asc, appId: string, version: string, platform: AscPlatform): Promise<AppleListingPlan> {
|
||||
const { config, resolve } = ctx.loaded;
|
||||
const app = config.app;
|
||||
const listing = readAppleCopy(ctx);
|
||||
const md = readFileSync(resolve(config.apple?.listing ?? 'store/appstore.md'), 'utf8');
|
||||
const listing = readAppleCopy(ctx, platform);
|
||||
const md = readFileSync(resolve(listingPathFor(config, platform)), 'utf8');
|
||||
const drafts = draftSections(md, 'apple');
|
||||
const include = ctx.args.has('include-drafts');
|
||||
const skipped: Skipped[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue