fix version display
All checks were successful
CI/CD Pipeline / test (push) Successful in 3s
CI/CD Pipeline / deploy (push) Successful in 20s
CI/CD Pipeline / promote_stable (push) Successful in 2s

This commit is contained in:
2026-02-14 11:45:07 +01:00
parent d724f80cad
commit 8270e635d6
2 changed files with 21 additions and 5 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": "70" "build": "71"
} }

View File

@@ -93,11 +93,27 @@ if [[ -n "$VERSION" || -n "$BUILD" ]]; then
require "vendor/autoload.php"; require "vendor/autoload.php";
$app = require "bootstrap/app.php"; $app = require "bootstrap/app.php";
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
if (getenv("SPEEDBB_VERSION")) { $version = getenv("SPEEDBB_VERSION");
\App\Models\Setting::updateOrCreate(["key" => "version"], ["value" => getenv("SPEEDBB_VERSION")]); $build = getenv("SPEEDBB_BUILD");
if ($version !== false && $version !== "") {
$updated = \Illuminate\Support\Facades\DB::table("settings")
->where("key", "version")
->update(["value" => $version]);
if ($updated === 0) {
\Illuminate\Support\Facades\DB::table("settings")
->insert(["key" => "version", "value" => $version, "created_at" => now(), "updated_at" => now()]);
}
echo "Updated version rows: {$updated}\n";
} }
if (getenv("SPEEDBB_BUILD")) { if ($build !== false && $build !== "") {
\App\Models\Setting::updateOrCreate(["key" => "build"], ["value" => getenv("SPEEDBB_BUILD")]); $updated = \Illuminate\Support\Facades\DB::table("settings")
->where("key", "build")
->update(["value" => $build]);
if ($updated === 0) {
\Illuminate\Support\Facades\DB::table("settings")
->insert(["key" => "build", "value" => $build, "created_at" => now(), "updated_at" => now()]);
}
echo "Updated build rows: {$updated}\n";
} }
' \ ' \
&& $PHP_BIN -r ' && $PHP_BIN -r '