prepare for cli updates with custom php binary
All checks were successful
CI/CD Pipeline / test (push) Successful in 2s
CI/CD Pipeline / deploy (push) Successful in 18s
CI/CD Pipeline / promote_stable (push) Successful in 2s

This commit is contained in:
2026-02-11 18:31:06 +01:00
parent af03c23c9f
commit 54d4cd7f99
5 changed files with 91 additions and 9 deletions

View File

@@ -21,14 +21,41 @@ git pull --ff-only
echo "Installing PHP dependencies..."
composer install --no-dev --optimize-autoloader
resolve_php_bin() {
if [[ -n "${PHP_BIN:-}" ]]; then
echo "$PHP_BIN"
return
fi
if command -v keyhelp-php84 >/dev/null 2>&1; then
echo "keyhelp-php84"
return
fi
if command -v php >/dev/null 2>&1; then
echo "php"
return
fi
echo "php"
}
PHP_BIN="$(resolve_php_bin)"
if [[ -x "artisan" ]]; then
CONFIGURED_PHP="$($PHP_BIN artisan tinker --execute="echo \\App\\Models\\Setting::where('key','system.php_binary')->value('value') ?? '';" 2>/dev/null || true)"
if [[ -n "$CONFIGURED_PHP" ]]; then
if command -v "$CONFIGURED_PHP" >/dev/null 2>&1; then
PHP_BIN="$CONFIGURED_PHP"
elif [[ -x "$CONFIGURED_PHP" ]]; then
PHP_BIN="$CONFIGURED_PHP"
fi
fi
fi
echo "Installing JS dependencies..."
npm install
echo "Building assets..."
npm run build
PHP_BIN="${PHP_BIN:-php}"
echo "Running migrations..."
$PHP_BIN artisan migrate --force