prepare for cli updates with custom php binary
All checks were successful
CI/CD Pipeline / test (push) Successful in 2s
CI/CD Pipeline / deploy (push) Successful in 20s
CI/CD Pipeline / promote_stable (push) Successful in 3s

This commit is contained in:
2026-02-11 19:01:23 +01:00
parent 5cd8a1a9d6
commit ce3b89d54e
2 changed files with 15 additions and 7 deletions

View File

@@ -98,5 +98,5 @@
"minimum-stability": "stable", "minimum-stability": "stable",
"prefer-stable": true, "prefer-stable": true,
"version": "26.0.2", "version": "26.0.2",
"build": "55" "build": "56"
} }

View File

@@ -79,12 +79,20 @@ echo "Syncing version/build to settings..."
VERSION="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["version"] ?? "";')" VERSION="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["version"] ?? "";')"
BUILD="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["build"] ?? "";')" BUILD="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["build"] ?? "";')"
if [[ -n "$VERSION" ]]; then if [[ -n "$VERSION" || -n "$BUILD" ]]; then
$PHP_BIN artisan tinker --execute="\\App\\Models\\Setting::updateOrCreate(['key'=>'version'], ['value'=>'$VERSION']);" $PHP_BIN -r '
fi require "vendor/autoload.php";
$app = require "bootstrap/app.php";
if [[ -n "$BUILD" ]]; then $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$PHP_BIN artisan tinker --execute="\\App\\Models\\Setting::updateOrCreate(['key'=>'build'], ['value'=>'$BUILD']);" if (getenv("SPEEDBB_VERSION")) {
\App\Models\Setting::updateOrCreate(["key" => "version"], ["value" => getenv("SPEEDBB_VERSION")]);
}
if (getenv("SPEEDBB_BUILD")) {
\App\Models\Setting::updateOrCreate(["key" => "build"], ["value" => getenv("SPEEDBB_BUILD")]);
}
' \
SPEEDBB_VERSION="$VERSION" \
SPEEDBB_BUILD="$BUILD"
fi fi
echo "Update complete." echo "Update complete."