Skip to content

Commit

Permalink
clone project => cp project & update
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuiyong committed Jan 19, 2016
1 parent 63e9014 commit 3dbcbcb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ class Folder extends Command {
* @return bool
*/
public function initLocalWorkspace($version) {
$cmd[] = 'mkdir -p ' . Project::getDeployWorkspace($version);
// svn
if ($this->config->repo_type == Project::REPO_SVN) {
$cmd[] = 'mkdir -p ' . Project::getDeployWorkspace($version);
$cmd[] = sprintf('mkdir -p %s-svn', rtrim(Project::getDeployWorkspace($version), '/'));
}
// git 直接把项目代码拷贝过来,然后更新,取代之前原项目检出,提速
else {
$cmd[] = sprintf('cp -rf %s %s ', Project::getDeployFromDir(), Project::getDeployWorkspace($version));
}
$command = join(' && ', $cmd);
return $this->runLocalCommand($command);
}
Expand Down

0 comments on commit 3dbcbcb

Please sign in to comment.