play images: tablet, TV and Wear sets are optional; play.tablets switch (default: tablet renders exist); a missing optional set never deletes Play's images without --prune
A phone-only project aborted with 'no sevenInchScreenshots'. Play requires the 512 icon, the 1024x500 feature graphic and at least 2 screenshots (Play Console Help answer 9866151). play images uploads what exists and prints an info line for missing optional sets; play.tablets true makes missing tablet sets an error in shots render/check/gallery, validate and play images. Pitfall 19.
This commit is contained in:
parent
18fde37b9b
commit
a9261a8052
18 changed files with 364 additions and 83 deletions
|
|
@ -11,7 +11,7 @@ import { join, relative } from 'node:path';
|
|||
import type { Ctx } from '../lib/ctx';
|
||||
import { done, log, printJson, warn } from '../lib/log';
|
||||
import { SIZES } from './lib';
|
||||
import { allIssues, requiredSets, type RendersScan, scanRenders } from './report';
|
||||
import { allIssues, requiredSets, type RendersScan, resolvedTablets, scanRenders } from './report';
|
||||
import { type Issue, IMAGE_SPECS, VIDEO_TARGETS } from './spec';
|
||||
|
||||
export interface GalleryTile {
|
||||
|
|
@ -241,7 +241,8 @@ export async function run(ctx: Ctx): Promise<void> {
|
|||
const dir = resolve(a.get('src') ?? config.renders ?? config.shots?.out ?? 'store/renders');
|
||||
const out = a.get('out') ? resolve(a.get('out')!) : join(dir, 'index.html');
|
||||
const variants = a.has('no-variants') ? [] : Object.keys(config.shots?.variants ?? {});
|
||||
const scan = scanRenders(dir, { langs, variants, required: lang => requiredSets(config, lang) });
|
||||
const tablets = resolvedTablets(config, dir);
|
||||
const scan = scanRenders(dir, { langs, variants, required: lang => requiredSets(config, lang, tablets) });
|
||||
if (!scan.images.length && !scan.videos.length) warn('shots', `no renders in ${dir} (storebound shots render)`);
|
||||
const data = galleryData(scan, { at: join(out, '..'), title: `${config.app.name} · store renders`, exists: existsSync });
|
||||
// --json: the data only (the desktop gallery), with the renders folder relative to the app folder; writes nothing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue