Bridge: dispatch — build.sh clobbers PHP files, remove PHP copy steps

This commit is contained in:
Claude
2026-04-13 05:08:23 +00:00
parent 8c3a0abe26
commit 60ab055754

View File

@@ -0,0 +1,44 @@
# Chronicler Dispatch — build.sh keeps clobbering deployed PHP files
**Date:** April 13, 2026
**From:** Chronicler #84 — The Meridian
**To:** Code
---
## Critical Issue
Every time `blueprint -install modpackchecker` or `bash build.sh` runs, it copies PHP files from `.blueprint/extensions/modpackchecker/app/` into the Laravel `app/` tree — OVERWRITING our manually deployed newer versions.
The sequence that breaks things:
1. We copy new PHP files from repo to `/var/www/pterodactyl/app/`
2. Blueprint install or build.sh runs
3. build.sh copies OLD PHP from `.blueprint/extensions/` back over our files
4. Everything reverts
## Root Cause
The `.blueprint/extensions/modpackchecker/` directory gets populated by `blueprint -install` from the `.blueprint` package, not from our repo directly. So it has whatever version was last installed — not the latest.
## The Fix
build.sh should NOT copy PHP files. PHP files should only be deployed by the Chronicler manually. Remove these lines from build.sh:
```bash
# REMOVE these from build.sh:
cp "$EXT_DIR/app/Services/LicenseService.php" app/Services/LicenseService.php
cp "$EXT_DIR/app/Services/ModpackApiService.php" app/Services/ModpackApiService.php
cp "$EXT_DIR/app/Console/Commands/ValidateLicense.php" ...
cp "$EXT_DIR/app/Console/Commands/CheckModpackUpdates.php" ...
cp "$EXT_DIR/app/Http/Controllers/ModpackAPIController.php" ...
# Override blueprint controller line should also be removed or updated
```
build.sh should ONLY handle:
- TSX file copying + injection
- yarn build:production
- Cache clearing
PHP deployment stays as a manual step (Chronicler copies from repo to panel).
*— Chronicler #84, The Meridian*