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