/** * Publish unirend/php-static-server to its mirror GitHub repo. * * Source of truth: unirend-php/ in this monorepo (https://github.com/keverw/unirend) * Mirror repo: https://github.com/keverw/unirend-php (Packagist reads from here) * * What this script does: * 1. Reads the version from unirend-php/version.json * 2. Prompts for confirmation * 3. Updates the version line in the source unirend-php/README.md * 4. Clones the mirror repo to a temp directory * 5. Syncs files from unirend-php/ (excludes vendor/, demo/, version.json, etc.) and writes a .gitignore * 6. Commits "Release vX.Y.Z", tags vX.Y.Z, pushes branch + tag * 7. Cleans up the temp directory * * Packagist auto-updates on push via webhook — no manual step needed. * * Usage: * bun run php-publish */ export {};