mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
let build command support windows
This commit is contained in:
parent
8d761864b9
commit
74cbfb8b73
@ -89,9 +89,10 @@ class BuildCommand extends Command
|
||||
|
||||
$phar->startBuffering();
|
||||
$files = FileSystem::scanDirFiles(SOURCE_ROOT_DIR, true, true);
|
||||
$separator = '\\' . DIRECTORY_SEPARATOR;
|
||||
// 只打包 bin / config / resources / src / vendor 目录以及 composer.json / composer.lock / entry.php
|
||||
$files = array_filter($files, function ($file) {
|
||||
return preg_match('/(^(bin|config|resources|src|vendor)\\/|^(composer\\.json|README\\.md)$)/', $file);
|
||||
$files = array_filter($files, function ($file) use ($separator) {
|
||||
return preg_match('/^(bin|config|resources|src|vendor)' . $separator . '|^(composer\\.json|README\\.md)$/', $file);
|
||||
});
|
||||
sort($files);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user