From a3f4dada09544689a076dc03fed1913297d4ec38 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Mon, 17 Aug 2026 14:47:17 -0400 Subject: [PATCH] Rename the deploy modules to *.build.ts They are the buildFiles the upcoming deploy config points at; "deploy" now belongs to the config entries that ship their outputs. Co-Authored-By: Claude Fable 5 --- README.md | 8 ++++---- assets.deploy.ts => assets.build.ts | 0 package.json | 2 +- ps.deploy.ts => ps.build.ts | 0 smogon.deploy.ts => smogon.build.ts | 0 tools/deploy/index.ts | 6 +++--- tsconfig.json | 2 +- updatexyicons.sh | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename assets.deploy.ts => assets.build.ts (100%) rename ps.deploy.ts => ps.build.ts (100%) rename smogon.deploy.ts => smogon.build.ts (100%) diff --git a/README.md b/README.md index 3206ce3f..455c17cf 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ $ brew install imagemagick gifsicle advancecomp optipng pngquant webp Install dependencies once with `pnpm install`. -Each deploy is a root `*.deploy.ts` module: it declares its build rules +Each deploy is a root `*.build.ts` module: it declares its build rules (shared sets are plain functions in `rules/`; declaring an identical rule twice is a no-op returning the existing artifacts, so any number of deploys can call the same set) and a `finish` function that maps the built artifacts @@ -62,9 +62,9 @@ reuses the build's digests. All state lives in `.build/`. ``` $ pnpm build # build every deploy's rules, GC stale state -$ pnpm deploy # assets.deploy.ts -> tar -> DEPLOY_COMMAND (.env) -$ node tools/deploy/index.ts build ps.deploy.ts # build one deploy's rules -$ node tools/deploy/index.ts run smogon.deploy.ts -o deploy/smogon +$ pnpm deploy # assets.build.ts -> tar -> DEPLOY_COMMAND (.env) +$ node tools/deploy/index.ts build ps.build.ts # build one deploy's rules +$ node tools/deploy/index.ts run smogon.build.ts -o deploy/smogon $ node tools/deploy/index.ts inspect src/minisprites/items/i1.png -o /tmp/out ``` diff --git a/assets.deploy.ts b/assets.build.ts similarity index 100% rename from assets.deploy.ts rename to assets.build.ts diff --git a/package.json b/package.json index 4e8ee918..1e5bdb86 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "type": "module", "scripts": { "build": "node tools/deploy/index.ts build", - "deploy": "node tools/deploy/index.ts deploy assets.deploy.ts", + "deploy": "node tools/deploy/index.ts deploy assets.build.ts", "check": "tsc --build tsconfig-workspace.json" }, "dependencies": { diff --git a/ps.deploy.ts b/ps.build.ts similarity index 100% rename from ps.deploy.ts rename to ps.build.ts diff --git a/smogon.deploy.ts b/smogon.build.ts similarity index 100% rename from smogon.deploy.ts rename to smogon.build.ts diff --git a/tools/deploy/index.ts b/tools/deploy/index.ts index a45cd57a..ae205f12 100644 --- a/tools/deploy/index.ts +++ b/tools/deploy/index.ts @@ -45,9 +45,9 @@ function common(cmd : ReturnType) : ReturnType f.endsWith('.deploy.ts')).sort(); + const files = fs.readdirSync('.').filter(f => f.endsWith('.build.ts')).sort(); if (files.length === 0) { - throw new BuildError('No *.deploy.ts files at the repo root'); + throw new BuildError('No *.build.ts files at the repo root'); } return files; } @@ -163,7 +163,7 @@ function waitExit(child : ChildProcess) : Promise { } common(program.command('build [files...]')) - .description('build the rules of the given deploys (default: all *.deploy.ts)') + .description('build the rules of the given deploys (default: all *.build.ts)') .action(async (files : string[], opts : CommonOpts) => { setConfig(loadConfig(opts.config)); // GC needs the full rule universe: only an unfiltered union build diff --git a/tsconfig.json b/tsconfig.json index efd01059..b43706f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig-base", - "include": ["*.deploy.ts", "rules/*.ts"], + "include": ["*.build.ts", "rules/*.ts"], "references": [ {"path": "tools/build"}, {"path": "tools/deploy"}, diff --git a/updatexyicons.sh b/updatexyicons.sh index 2427bcff..ecd91d4f 100755 --- a/updatexyicons.sh +++ b/updatexyicons.sh @@ -5,6 +5,6 @@ set -ex cd ~/smogon/sprites rm -rf deploy/smogon -node tools/deploy/index.ts run smogon.deploy.ts -o deploy/smogon +node tools/deploy/index.ts run smogon.build.ts -o deploy/smogon rsync -a deploy/smogon/xyicons/ smogon:/smog2/sprites/xyicons