17 lines
732 B
PHP
17 lines
732 B
PHP
<?php
|
|
|
|
// Run only after building EZ, within the hn deployment checkout.
|
|
require __DIR__.'/../../vendor/autoload.php';
|
|
$app = require __DIR__.'/../../bootstrap/app.php';
|
|
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
|
if (!App\Support\SiteProfile::isHn()) {
|
|
throw new RuntimeException('EZ asset publication requires SITE_PROFILE=hn.');
|
|
}
|
|
if (!is_file(base_path('theme/EZ/assets/.vite/manifest.json'))) {
|
|
throw new RuntimeException('Build EZ first: cd frontends && npm ci && npm run build:hn');
|
|
}
|
|
if (!Illuminate\Support\Facades\File::copyDirectory(base_path('theme/EZ'), public_path('theme/EZ'))) {
|
|
throw new RuntimeException('Failed to publish EZ assets.');
|
|
}
|
|
echo "EZ assets published for hn.\n";
|