mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 08:35:35 +08:00
fix composer production bugs
This commit is contained in:
@@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-autoload-dump": "vendor/bin/captainhook install -f -s",
|
"post-autoload-dump": "[ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/captainhook install -f -s",
|
||||||
"analyse": "phpstan analyse --memory-limit 300M",
|
"analyse": "phpstan analyse --memory-limit 300M",
|
||||||
"cs-fix": "PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix",
|
"cs-fix": "PHP_CS_FIXER_FUTURE_MODE=1 php-cs-fixer fix",
|
||||||
"test": "bin/phpunit-zm --no-coverage"
|
"test": "bin/phpunit-zm --no-coverage"
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ class BuildCommand extends Command
|
|||||||
}
|
}
|
||||||
$target = $build_dir . '/' . $target;
|
$target = $build_dir . '/' . $target;
|
||||||
// 确认 Phar 文件可以写入
|
// 确认 Phar 文件可以写入
|
||||||
|
FileSystem::createDir($build_dir);
|
||||||
FileSystem::ensureFileWritable($target);
|
FileSystem::ensureFileWritable($target);
|
||||||
|
|
||||||
$this->comment("目标文件:{$target}");
|
$this->comment("目标文件:{$target}");
|
||||||
@@ -51,6 +52,8 @@ class BuildCommand extends Command
|
|||||||
unlink($target);
|
unlink($target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: 增加开发依赖的判定并提醒
|
||||||
|
|
||||||
$this->info('正在构建 Phar 包');
|
$this->info('正在构建 Phar 包');
|
||||||
|
|
||||||
$this->build(
|
$this->build(
|
||||||
|
|||||||
Reference in New Issue
Block a user