make the update more verbose for testing
This commit is contained in:
@@ -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>" \
|
||||||
|
|||||||
Reference in New Issue
Block a user