完善代码编译

This commit is contained in:
2022-11-25 16:49:15 +08:00
parent ed3ef2609a
commit b5c49962e1
4 changed files with 23 additions and 2847 deletions

9
.gitignore vendored
View File

@@ -4,16 +4,11 @@
.env .env
config/install/lock/install.lock config/install/lock/install.lock
public/upload public/upload
public/docs
public/conf
public/WowOss.exe
app/index/controller/Test.php
composer.phar composer.phar
app/test/ app/test/
vendor vendor
runtime runtime
ul.db ul.db
/app/tools/controller/Install.php /app/tools/controller/Install.php
/app/common/command/curd/migrate_output.php /build
/dist /composer.lock
/temp

View File

@@ -87,11 +87,11 @@ class Dist extends Command
$app_path = App::getRootPath(); $app_path = App::getRootPath();
$dist_path = $app_path . 'dist'; $dist_path = $app_path . 'build/dist';
PathTools::intiDir($dist_path . '.temp'); PathTools::intiDir($dist_path . '.temp');
$temp_path = $app_path . 'temp'; $temp_path = $app_path . 'build/temp';
PathTools::intiDir($temp_path . '.temp'); PathTools::intiDir($temp_path . '.temp');
@@ -114,20 +114,11 @@ class Dist extends Command
$this->tempFilesystem = $temp_filesystem; $this->tempFilesystem = $temp_filesystem;
$list_dist = $dist_filesystem->listContents(); $this->clearDistDir();
$this->clearTempDir();
foreach ($list_dist as $file_info) {
if ($file_info['type'] == 'file') {
$dist_filesystem->delete($file_info['path']);
} else {
$dist_filesystem->deleteDir($file_info['path']);
}
}
$this->packEnv(); $this->packEnv();
return ;
$list_content = $temp_filesystem->listContents('', true); $list_content = $temp_filesystem->listContents('', true);
foreach ($list_content as $file_info) { foreach ($list_content as $file_info) {
if ($file_info['type'] == 'dir') { if ($file_info['type'] == 'dir') {
@@ -194,7 +185,19 @@ class Dist extends Command
$output->info('打包完成'); $output->info('打包完成');
} }
public function clearDistDir()
{
$list_dist = $this->distFilesystem->listContents();
foreach ($list_dist as $file_info) {
if ($file_info['type'] == 'file') {
$this->distFilesystem->delete($file_info['path']);
} else {
$this->distFilesystem->deleteDir($file_info['path']);
}
}
}
public function clearTempDir() public function clearTempDir()
{ {
$list_dist = $this->tempFilesystem->listContents(); $list_dist = $this->tempFilesystem->listContents();
@@ -259,7 +262,7 @@ class Dist extends Command
$this->tempFilesystem->put($path, $result_content); $this->tempFilesystem->put($path, $result_content);
} }
if($this->tempFilesystem->has('.env')){ if ($this->tempFilesystem->has('.env')) {
$this->tempFilesystem->delete('.env'); $this->tempFilesystem->delete('.env');
} }
} }
@@ -650,7 +653,7 @@ class Dist extends Command
if (!empty($extend_name)) { if (!empty($extend_name)) {
$try_namse_extend_name = $class_item['namespace_name'] . '\\' . $extend_name; $try_namse_extend_name = $extend_name;
if (isset($this->packList[$try_namse_extend_name])) { if (isset($this->packList[$try_namse_extend_name])) {
$this->insertToNewPackList($try_namse_extend_name, $this->packList[$try_namse_extend_name]); $this->insertToNewPackList($try_namse_extend_name, $this->packList[$try_namse_extend_name]);
@@ -658,10 +661,6 @@ class Dist extends Command
} }
} }
$this->newPackList[$class_name] = $class_item; $this->newPackList[$class_name] = $class_item;
} }

View File

@@ -90,6 +90,7 @@ class MenuService
['pid', '<>', MenuConstant::HOME_PID], ['pid', '<>', MenuConstant::HOME_PID],
]) ])
->order([ ->order([
'pid' => 'asc',
'sort' => 'desc', 'sort' => 'desc',
'id' => 'asc', 'id' => 'asc',
]) ])

2819
composer.lock generated

File diff suppressed because it is too large Load Diff