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 <noreply@anthropic.com>
This commit is contained in:
Christopher Monsanto
2026-08-17 14:47:17 -04:00
parent bc39c94851
commit a3f4dada09
8 changed files with 10 additions and 10 deletions

View File

@@ -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
```

View File

@@ -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": {

View File

@@ -45,9 +45,9 @@ function common(cmd : ReturnType<typeof program.command>) : ReturnType<typeof pr
}
function discoverDeployFiles() : string[] {
const files = fs.readdirSync('.').filter(f => 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<number | null> {
}
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

View File

@@ -1,6 +1,6 @@
{
"extends": "./tsconfig-base",
"include": ["*.deploy.ts", "rules/*.ts"],
"include": ["*.build.ts", "rules/*.ts"],
"references": [
{"path": "tools/build"},
{"path": "tools/deploy"},

View File

@@ -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