|
@@ -200,7 +200,7 @@ class PackageClass
|
|
|
|
|
|
//获取安装目录
|
|
|
$rootDir = dirname($vendorDir);
|
|
|
- $commonDir = pathJoin($rootDir,'siscom');
|
|
|
+ $commonDir = pathJoin($rootDir,'common');
|
|
|
$configDir = pathJoin($rootDir,'config',$moduleName);
|
|
|
$moduleDir = pathJoin($rootDir,'module',$moduleName);
|
|
|
|
|
@@ -274,6 +274,7 @@ class PackageClass
|
|
|
}
|
|
|
foreach($commonFiles as $fileInfo){
|
|
|
$fileName = $fileInfo['name'];
|
|
|
+ $target = $fileInfo['target'];
|
|
|
//下载文件到缓存区
|
|
|
$filePath = downloadToDir($toolDir,$ossHost,$repoName,$fileName,$cacheDir);
|
|
|
if(! $filePath ){
|
|
@@ -284,7 +285,8 @@ class PackageClass
|
|
|
|
|
|
// 解压文件
|
|
|
if( isZipFile($fileName) ){
|
|
|
- if(! unzipFile($toolDir,$filePath,$commonDir)) {
|
|
|
+ $targetDir = pathJoin($commonDir,$target);
|
|
|
+ if(! unzipFile($toolDir,$filePath,$targetDir)) {
|
|
|
logError($repoName,"unzip common file failed",$fileName);
|
|
|
return false;
|
|
|
}
|
|
@@ -307,6 +309,7 @@ class PackageClass
|
|
|
}
|
|
|
foreach($configFiles as $fileInfo){
|
|
|
$fileName = $fileInfo['name'];
|
|
|
+ $targetName = $fileInfo['target'];
|
|
|
$filePath = pathJoin($moduleDir,$fileName);
|
|
|
if(! file_exists($filePath) ){
|
|
|
logError($repoName,"config file not exists",$filePath);
|
|
@@ -315,7 +318,7 @@ class PackageClass
|
|
|
if(!$fileInfo['override'] && file_exists($targetPath)){
|
|
|
logInfo($repoName,"skip copy config file",$targetPath);
|
|
|
}
|
|
|
- $targetPath = pathJoin($configDir,$fileName);
|
|
|
+ $targetPath = pathJoin($configDir,$targetName);
|
|
|
fileCopy($filePath,$targetPath);
|
|
|
}
|
|
|
return true;
|