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