The swiss army knife of lossless video/audio editing
storeRelease: show blockers in dry runs instead of a clean plan
Claudecccb9d88dfca
diff --git a/script/storeRelease.ts b/script/storeRelease.tsindex 1259ab22..fc55beb6 100644--- a/script/storeRelease.ts+++ b/script/storeRelease.ts@@ -57,6 +57,11 @@ function requireEnv(name: string) {const log = (...rest: unknown[]) => console.log(...rest);const plan = (msg: string) => log(write ? `→ ${msg}` : `[dry run] would: ${msg}`);+// stops a real run, but lets a dry run go on to show the rest of its plan+const blocker = (msg: string) => {+ assert(!write, msg);+ log(`[dry run] BLOCKED, --submit would stop here: ${msg}`);+};async function fetchJson(url: string, init: RequestInit & { hint?: string } = {}) {const { hint, ...rest } = init;@@ -301,14 +306,12 @@ async function msstore(version: string) {log(`${version} is already submitted, nothing to do. Once certified, click "Publish now" in Partner Center`);return;}- assert(!write, pending.status === 'PendingCommit'+ blocker(pending.status === 'PendingCommit'? 'The pending submission was never submitted (maybe left by a failed run). Delete it in Partner Center and run again': 'Finish or delete the pending submission in Partner Center first');}if (published.packageDeliveryOptions.packageRollout.packageRolloutStatus === 'PackageRolloutInProgress') {- const msg = 'The last published submission\'s gradual rollout is still in progress; finalize it first (msstore-rollout 100) or halt it in Partner Center';- assert(!write, msg);- log(`Warning: ${msg}`);+ blocker('The last published submission\'s gradual rollout is still in progress; finalize it first (msstore-rollout 100) or halt it in Partner Center');}const packages = msStoreArchs.map((arch) => ({