Compare commits
5 Commits
bcf8b6621b
...
1cf2dc3d86
Author | SHA1 | Date | |
---|---|---|---|
1cf2dc3d86 | |||
57d2f20255 | |||
5d671d03d2 | |||
d74a30f33e | |||
798c687547 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Kernel",
|
"name": "Kernel",
|
||||||
"version": "0.2",
|
"version": "0.1.1",
|
||||||
"author": "ITGuild",
|
"author": "ITGuild",
|
||||||
"slug": "kernel",
|
"slug": "kernel",
|
||||||
"type": "kernel",
|
"type": "kernel",
|
||||||
|
@ -15,7 +15,7 @@ $form->field(\itguild\forms\inputs\Select::class, "files[]", [
|
|||||||
])
|
])
|
||||||
->setLabel("Дополнительные файлы")
|
->setLabel("Дополнительные файлы")
|
||||||
->setOptions([
|
->setOptions([
|
||||||
'.env.example' => '.env.example',
|
'env.example' => 'env.example',
|
||||||
'bootstrap.php' => 'bootstrap',
|
'bootstrap.php' => 'bootstrap',
|
||||||
'composer.json' => 'composer.json',
|
'composer.json' => 'composer.json',
|
||||||
])
|
])
|
||||||
|
@ -74,18 +74,21 @@ class KernelService
|
|||||||
$this->files->copyKernelFolder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel");
|
$this->files->copyKernelFolder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel");
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
Debug::prn($file);
|
if ($file === 'bootstrap.php') {
|
||||||
if ($file === 'bootstrap') {
|
|
||||||
Debug::prn(123);
|
|
||||||
$this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap');
|
$this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap');
|
||||||
$this->files->copyKernelFolder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap');
|
$this->files->copyKernelFolder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap');
|
||||||
}
|
}
|
||||||
|
if ($file === 'env.example') {
|
||||||
|
copy($tmpKernelDirFull . $file , ROOT_DIR . '/.' . $file);
|
||||||
|
chmod(ROOT_DIR . '/.' . $file, 0775);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
copy($tmpKernelDirFull . $file , ROOT_DIR . '/' . $file);
|
copy($tmpKernelDirFull . $file , ROOT_DIR . '/' . $file);
|
||||||
|
chmod(ROOT_DIR . '/' . $file, 0775);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->files->recursiveRemoveDir($tmpKernelDirFull);
|
$this->files->recursiveRemoveDir($tmpKernelDirFull);
|
||||||
unlink(ROOT_DIR . $path);
|
unlink(ROOT_DIR . $path);
|
||||||
Debug::dd("update kernel success");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user