prepare for cli updates with custom php binary
This commit is contained in:
@@ -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": "55"
|
"build": "56"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,12 +79,20 @@ echo "Syncing version/build to settings..."
|
|||||||
VERSION="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["version"] ?? "";')"
|
VERSION="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["version"] ?? "";')"
|
||||||
BUILD="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["build"] ?? "";')"
|
BUILD="$($PHP_BIN -r '$c=json_decode(file_get_contents("composer.json"), true); echo $c["build"] ?? "";')"
|
||||||
|
|
||||||
if [[ -n "$VERSION" ]]; then
|
if [[ -n "$VERSION" || -n "$BUILD" ]]; then
|
||||||
$PHP_BIN artisan tinker --execute="\\App\\Models\\Setting::updateOrCreate(['key'=>'version'], ['value'=>'$VERSION']);"
|
$PHP_BIN -r '
|
||||||
fi
|
require "vendor/autoload.php";
|
||||||
|
$app = require "bootstrap/app.php";
|
||||||
if [[ -n "$BUILD" ]]; then
|
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||||
$PHP_BIN artisan tinker --execute="\\App\\Models\\Setting::updateOrCreate(['key'=>'build'], ['value'=>'$BUILD']);"
|
if (getenv("SPEEDBB_VERSION")) {
|
||||||
|
\App\Models\Setting::updateOrCreate(["key" => "version"], ["value" => getenv("SPEEDBB_VERSION")]);
|
||||||
|
}
|
||||||
|
if (getenv("SPEEDBB_BUILD")) {
|
||||||
|
\App\Models\Setting::updateOrCreate(["key" => "build"], ["value" => getenv("SPEEDBB_BUILD")]);
|
||||||
|
}
|
||||||
|
' \
|
||||||
|
SPEEDBB_VERSION="$VERSION" \
|
||||||
|
SPEEDBB_BUILD="$BUILD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Update complete."
|
echo "Update complete."
|
||||||
|
|||||||
Reference in New Issue
Block a user