fix version display
This commit is contained in:
@@ -98,5 +98,5 @@
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true,
|
||||
"version": "26.0.2",
|
||||
"build": "70"
|
||||
"build": "71"
|
||||
}
|
||||
|
||||
@@ -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()]);
|
||||
}
|
||||
if (getenv("SPEEDBB_BUILD")) {
|
||||
\App\Models\Setting::updateOrCreate(["key" => "build"], ["value" => getenv("SPEEDBB_BUILD")]);
|
||||
echo "Updated version rows: {$updated}\n";
|
||||
}
|
||||
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 '
|
||||
|
||||
Reference in New Issue
Block a user