make the update more verbose for testing
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 2s

This commit is contained in:
2026-02-15 23:27:49 +01:00
parent 3aab864c34
commit 9496078644

View File

@@ -151,24 +151,30 @@ if [[ -n "$VERSION" || -n "$BUILD" ]]; then
$version = getenv("SPEEDBB_VERSION"); $version = getenv("SPEEDBB_VERSION");
$build = getenv("SPEEDBB_BUILD"); $build = getenv("SPEEDBB_BUILD");
if ($version !== false && $version !== "") { if ($version !== false && $version !== "") {
$updated = \Illuminate\Support\Facades\DB::table("settings") \Illuminate\Support\Facades\DB::table("settings")->upsert(
->where("key", "version") [[
->update(["value" => $version]); "key" => "version",
if ($updated === 0) { "value" => $version,
\Illuminate\Support\Facades\DB::table("settings") "created_at" => now(),
->insert(["key" => "version", "value" => $version, "created_at" => now(), "updated_at" => now()]); "updated_at" => now(),
} ]],
echo "Updated version rows: {$updated}\n"; ["key"],
["value", "updated_at"]
);
echo "Upserted version setting.\n";
} }
if ($build !== false && $build !== "") { if ($build !== false && $build !== "") {
$updated = \Illuminate\Support\Facades\DB::table("settings") \Illuminate\Support\Facades\DB::table("settings")->upsert(
->where("key", "build") [[
->update(["value" => $build]); "key" => "build",
if ($updated === 0) { "value" => $build,
\Illuminate\Support\Facades\DB::table("settings") "created_at" => now(),
->insert(["key" => "build", "value" => $build, "created_at" => now(), "updated_at" => now()]); "updated_at" => now(),
} ]],
echo "Updated build rows: {$updated}\n"; ["key"],
["value", "updated_at"]
);
echo "Upserted build setting.\n";
} }
' \ ' \
&& echo "Running with PHP binary: $PHP_BIN -r <verify settings version/build>" \ && echo "Running with PHP binary: $PHP_BIN -r <verify settings version/build>" \