From 8270e635d6d9f874784b8cc76c8603238a9ef768 Mon Sep 17 00:00:00 2001 From: tracer Date: Sat, 14 Feb 2026 11:45:07 +0100 Subject: [PATCH] fix version display --- composer.json | 2 +- git_update.sh | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index e5bf06f..0fd2464 100644 --- a/composer.json +++ b/composer.json @@ -98,5 +98,5 @@ "minimum-stability": "stable", "prefer-stable": true, "version": "26.0.2", - "build": "70" + "build": "71" } diff --git a/git_update.sh b/git_update.sh index a40b715..dc43690 100755 --- a/git_update.sh +++ b/git_update.sh @@ -93,11 +93,27 @@ if [[ -n "$VERSION" || -n "$BUILD" ]]; then require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); - if (getenv("SPEEDBB_VERSION")) { - \App\Models\Setting::updateOrCreate(["key" => "version"], ["value" => getenv("SPEEDBB_VERSION")]); + $version = 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")) { - \App\Models\Setting::updateOrCreate(["key" => "build"], ["value" => getenv("SPEEDBB_BUILD")]); + if ($build !== false && $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 '