Skip to content

Commit 3dbcbcb

Browse files
author
wushuiyong
committed
clone project => cp project & update
1 parent 63e9014 commit 3dbcbcb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/Folder.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ class Folder extends Command {
1919
* @return bool
2020
*/
2121
public function initLocalWorkspace($version) {
22-
$cmd[] = 'mkdir -p ' . Project::getDeployWorkspace($version);
22+
// svn
2323
if ($this->config->repo_type == Project::REPO_SVN) {
24+
$cmd[] = 'mkdir -p ' . Project::getDeployWorkspace($version);
2425
$cmd[] = sprintf('mkdir -p %s-svn', rtrim(Project::getDeployWorkspace($version), '/'));
2526
}
27+
// git 直接把项目代码拷贝过来,然后更新,取代之前原项目检出,提速
28+
else {
29+
$cmd[] = sprintf('cp -rf %s %s ', Project::getDeployFromDir(), Project::getDeployWorkspace($version));
30+
}
2631
$command = join(' && ', $cmd);
2732
return $this->runLocalCommand($command);
2833
}

0 commit comments

Comments
 (0)