|
| 1 | +# Maintainer automations |
| 2 | + |
| 3 | +This folder contains scripts the maintainers run to build, version, and ship WOML. They are **not** user-facing examples — for those, see `examples/` at the repo root. |
| 4 | + |
| 5 | +## `bump-version.ts` |
| 6 | + |
| 7 | +A prep tool that edits every place in the repo where the WOML version lives, regenerates the Cargo lockfile, and runs the full release validation suite. After it finishes, it prints the exact `git commit`, `git tag`, and `git push` commands the human should run. |
| 8 | + |
| 9 | +### Toolchain |
| 10 | + |
| 11 | +Requires the same toolchain as the rest of the project: `bun`, `git`, `cargo`, and `npm`. All are already hard dependencies. |
| 12 | + |
| 13 | +### Usage |
| 14 | + |
| 15 | +```bash |
| 16 | +# From anywhere inside the repo |
| 17 | +bun automations/bump-version.ts --from 1.0.4 --to 1.0.5 |
| 18 | + |
| 19 | +# Preview what would change without editing anything |
| 20 | +bun automations/bump-version.ts --from 1.0.4 --to 1.0.5 --dry-run |
| 21 | +``` |
| 22 | + |
| 23 | +The tool auto-detects the repository root by walking up from the current directory looking for the `woml-repository` `package.json`, so it works from any subdirectory. |
| 24 | + |
| 25 | +### What it edits |
| 26 | + |
| 27 | +The full list of files the tool knows how to bump: |
| 28 | + |
| 29 | +- `woml-cli/package.json` — public `woml-cli` |
| 30 | +- `woml/package.json` — private `@woml/compiler` |
| 31 | +- `package.json` (repo root) — private `woml-repository` |
| 32 | +- `woml-vscode/package.json` — private `woml-language` |
| 33 | +- `core/woml-engine/Cargo.toml` — package version |
| 34 | +- `core/woml-native/Cargo.toml` — package version + `woml-engine` dependency version |
| 35 | +- `examples/production/deployment/Dockerfile` — `ARG WOML_VERSION=` |
| 36 | +- `core/Cargo.lock` — regenerated via `cargo update --workspace` |
| 37 | +- `woml-cli/scripts/release-package.ts` — identity check + log line |
| 38 | +- `woml-cli/scripts/verify-production-release.ts` — identity check |
| 39 | +- `woml-cli/scripts/verify-final-release-review.ts` — identity check |
| 40 | +- `woml-cli/tests/release-identity.test.ts` — fixtures + test name |
| 41 | +- `woml-cli/tests/release-family.test.ts` — fixtures |
| 42 | +- `woml-cli/tests/native-platform-release.test.ts` — fixture |
| 43 | +- `core/woml-native/tests/separation.rs` — Rust string literal |
| 44 | + |
| 45 | +### What it does **not** do |
| 46 | + |
| 47 | +The tool is prep-only. It deliberately does not: |
| 48 | + |
| 49 | +- Run `git commit` |
| 50 | +- Run `git tag` |
| 51 | +- Run `git push` |
| 52 | +- Run `npm publish` |
| 53 | + |
| 54 | +After the tool finishes successfully, it prints the exact commands the human should run. This is a safety net: every irreversible action (commit, tag, push, publish) remains a deliberate human choice. |
| 55 | + |
| 56 | +### When to update this tool |
| 57 | + |
| 58 | +If a new manifest is added to the project (a new `package.json`, `Cargo.toml`, hardcoded version string), the maintainer must add it to `bump-version.ts` so the next bump catches it. The `git diff --stat` summary at the end of each run makes any missing bump visible — if the expected files don't appear in the diff, the tool needs updating. |
| 59 | + |
| 60 | +### Validation it runs |
| 61 | + |
| 62 | +After all edits, the tool runs: |
| 63 | + |
| 64 | +1. `bun test tests/release-identity.test.ts tests/native-platform-release.test.ts --max-concurrency=1` |
| 65 | +2. `bun test tests/release-automation.test.ts tests/release-artifact.test.ts tests/release-family.test.ts --max-concurrency=1` |
| 66 | +3. `bun scripts/verify-native-platform-release.ts` |
| 67 | +4. `bun scripts/verify-documentation.ts` |
| 68 | +5. `bun run typecheck` |
| 69 | + |
| 70 | +If any step fails, the tool halts and prints the failing step's stderr. No edits are rolled back — the human can fix the issue and re-run the tool; it's idempotent for the version-string edits (replace is a no-op if the new value already matches). |
0 commit comments