fix version updates
This commit is contained in:
@@ -85,6 +85,7 @@ $PHP_BIN artisan migrate --force
|
||||
echo "Syncing version/build to settings..."
|
||||
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"] ?? "";')"
|
||||
echo "Computed from composer.json: VERSION=$VERSION, BUILD=$BUILD"
|
||||
|
||||
if [[ -n "$VERSION" || -n "$BUILD" ]]; then
|
||||
echo "Updating settings version/build (VERSION=$VERSION, BUILD=$BUILD)..."
|
||||
@@ -101,6 +102,14 @@ if [[ -n "$VERSION" || -n "$BUILD" ]]; then
|
||||
' \
|
||||
SPEEDBB_VERSION="$VERSION" \
|
||||
SPEEDBB_BUILD="$BUILD"
|
||||
$PHP_BIN -r '
|
||||
require "vendor/autoload.php";
|
||||
$app = require "bootstrap/app.php";
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
$version = \App\Models\Setting::where("key", "version")->value("value");
|
||||
$build = \App\Models\Setting::where("key", "build")->value("value");
|
||||
echo "Settings now: version={$version}, build={$build}\n";
|
||||
'
|
||||
fi
|
||||
|
||||
echo "Update complete."
|
||||
|
||||
Reference in New Issue
Block a user