Use prebuilt package in system updater
This commit is contained in:
@@ -152,38 +152,7 @@ class SystemUpdateController extends Controller
|
|||||||
|
|
||||||
$this->ensurePublicStorageLink();
|
$this->ensurePublicStorageLink();
|
||||||
|
|
||||||
$append('Installing composer dependencies...');
|
$append('Using prebuilt release package (skipping composer/npm steps).');
|
||||||
$composer = new Process(['composer', 'install', '--no-dev', '--optimize-autoloader'], base_path());
|
|
||||||
$composer->setTimeout(600);
|
|
||||||
$composer->run();
|
|
||||||
if (!$composer->isSuccessful()) {
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'Composer install failed.',
|
|
||||||
'log' => array_merge($log, [$composer->getErrorOutput()]),
|
|
||||||
], 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
$append('Installing npm dependencies...');
|
|
||||||
$npmInstall = new Process(['npm', 'install'], base_path());
|
|
||||||
$npmInstall->setTimeout(600);
|
|
||||||
$npmInstall->run();
|
|
||||||
if (!$npmInstall->isSuccessful()) {
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'npm install failed.',
|
|
||||||
'log' => array_merge($log, [$npmInstall->getErrorOutput()]),
|
|
||||||
], 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
$append('Building assets...');
|
|
||||||
$npmBuild = new Process(['npm', 'run', 'build'], base_path());
|
|
||||||
$npmBuild->setTimeout(900);
|
|
||||||
$npmBuild->run();
|
|
||||||
if (!$npmBuild->isSuccessful()) {
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'npm run build failed.',
|
|
||||||
'log' => array_merge($log, [$npmBuild->getErrorOutput()]),
|
|
||||||
], 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpBinary = trim((string) Setting::where('key', 'system.php_binary')->value('value'));
|
$phpBinary = trim((string) Setting::where('key', 'system.php_binary')->value('value'));
|
||||||
if ($phpBinary === '') {
|
if ($phpBinary === '') {
|
||||||
|
|||||||
@@ -98,5 +98,5 @@
|
|||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"version": "26.0.3",
|
"version": "26.0.3",
|
||||||
"build": "105"
|
"build": "106"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user