apple: macOS (tvOS, visionOS) versions are no longer invisible: every version and review submission lookup is per platform; status, listing, listing pull, resubmit, submit, release and screenshots take --platform and otherwise pick the platform that has the version they need (refuse naming both when several do); status, validate, release status, the report and the desktop label versions with their platform; MCP and owner actions get platform; pitfall 77
This commit is contained in:
parent
1736300784
commit
47dfd372fe
30 changed files with 423 additions and 127 deletions
|
|
@ -16,7 +16,8 @@
|
|||
// STOREBOUND_TARGET_LANG (App Store locale, else Play code, else language id) in the environment; its stdout is
|
||||
// the translation. Existing translated files are kept unless --force.
|
||||
// storebound whats-new check [--dir store/whats-new] [--json] limits per store (Play 500, App Store 4000), untranslated files
|
||||
// storebound whats-new apply [--dir store/whats-new] [--dry] [--json] checked files -> both listing files
|
||||
// storebound whats-new apply [--dir store/whats-new] [--platform ios|macos|tvos|visionos] [--dry] [--json] checked files -> both listing files
|
||||
// (--platform only goes into the printed apple listing command: the App Store's what's new is per platform version)
|
||||
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import type { Language } from './lib/config';
|
||||
|
|
@ -29,6 +30,7 @@ import {
|
|||
resolveLanguages, setAppleWhatsNew, setPlayWhatsNew,
|
||||
} from './lib/whats-new';
|
||||
import * as rt from './lib/rt';
|
||||
import { parsePlatform } from './apple/platform';
|
||||
|
||||
const TAG = 'whats-new';
|
||||
const storeCode = (l: Language): string => l.apple ?? playCodes(l)[0] ?? l.id;
|
||||
|
|
@ -93,6 +95,7 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
const { config, root, resolve } = ctx.loaded;
|
||||
const a = ctx.args;
|
||||
if (a._[0] === 'check' || a._[0] === 'apply') {
|
||||
parsePlatform(a.get('platform')); // a wrong --platform fails before anything is written
|
||||
const dir = resolve(a.get('dir') ?? 'store/whats-new');
|
||||
const files = readDir(dir, config.languages);
|
||||
if (!files.length) throw new Error(`${dir}: no <language id>.md files`);
|
||||
|
|
@ -114,7 +117,8 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
if (a.has('dry')) { done(TAG, 'dry run: listing files not written'); return; }
|
||||
if (playFile && md.play !== undefined) writeFileSync(playFile, md.play);
|
||||
if (appleFile && md.apple !== undefined) writeFileSync(appleFile, md.apple);
|
||||
done(TAG, `release notes of ${files.length} language(s) written into the listing files; push them with play release / apple listing`);
|
||||
const pf = a.get('platform');
|
||||
done(TAG, `release notes of ${files.length} language(s) written into the listing files; push them with play release / apple listing --version x.y.z${pf ? ` --platform ${pf}` : ''} (the App Store's what's new belongs to one platform's version: apple listing picks the platform with the editable version, or asks)`);
|
||||
return;
|
||||
}
|
||||
const since = a.get('since') ?? (() => { try { return git(['describe', '--tags', '--abbrev=0'], root).trim(); } catch { return ''; } })();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue