Files
Shade/scripts/bump-version.ts
Sterister 518dc68c4f
Some checks failed
Test / test (push) Has been cancelled
feat(cli): M-Tool 1-3 — CLI, templates, Gitea publishing pipeline
Phase B complete: Shade now has a full developer tooling story.

@shade/cli
- shade init with project scaffolding from templates
- shade fingerprint (own or peer)
- shade publish (re-upload bundle)
- shade rotate (--identity for full rotation, otherwise signed prekey)
- shade peer add/list/verify/remove
- shade dashboard (opens observer in browser)
- shade doctor (diagnose config, storage, prekey server reachability)
- Config from .shaderc.json or SHADE_* env vars

Templates (in packages/shade-cli/templates/)
- bun-server — Bun + Hono backend with /send + /receive endpoints
- chat-demo — Two-process Alice/Bob chat over HTTP

Publishing pipeline (Gitea npm registry)
- .gitea/workflows/test.yml — CI on push/PR with PostgreSQL service
- .gitea/workflows/publish.yml — publish on git tag v*
- scripts/publish-all.ts — local publish helper with DRY_RUN support
- scripts/bump-version.ts — lockstep version bump across all packages
- Root package.json scripts: version, publish:dry, publish:all

Also: /health endpoint now lives in createPrekeyRoutes so doctor can
probe it without needing the full standalone setup.

Dry-run verified: all 11 packages pack cleanly.
246 tests passing, 0 failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 00:38:00 +02:00

41 lines
1.3 KiB
TypeScript

#!/usr/bin/env bun
/**
* Bump the version of all @shade/* packages in lockstep.
*
* Usage:
* bun run scripts/bump-version.ts 1.1.0
*/
import { readFileSync, writeFileSync, readdirSync, statSync } from 'fs';
import { join } from 'path';
const ROOT = join(import.meta.dir, '..');
const PACKAGES_DIR = join(ROOT, 'packages');
const newVersion = process.argv[2];
if (!newVersion || !/^\d+\.\d+\.\d+(?:-[a-z0-9.]+)?$/.test(newVersion)) {
console.error('Usage: bun run scripts/bump-version.ts <version>');
console.error('Example: bun run scripts/bump-version.ts 1.1.0');
process.exit(1);
}
const packages = readdirSync(PACKAGES_DIR).filter((name) => {
return statSync(join(PACKAGES_DIR, name)).isDirectory();
});
let updated = 0;
for (const pkg of packages) {
const pkgPath = join(PACKAGES_DIR, pkg, 'package.json');
try {
const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf-8'));
pkgJson.version = newVersion;
writeFileSync(pkgPath, JSON.stringify(pkgJson, null, 2) + '\n');
console.log(` ${pkgJson.name}${newVersion}`);
updated++;
} catch (err) {
console.error(`${pkg}: ${(err as Error).message}`);
}
}
console.log(`\nUpdated ${updated} packages to ${newVersion}`);
console.log(`Next: git commit -am "chore: bump to ${newVersion}" && git tag v${newVersion} && git push --tags`);