app\components\Folder::_packageFiles PHP 메소드

_packageFiles() 보호된 메소드

protected _packageFiles ( Project $project, Task $task ) : boolean
$project app\models\Project
$task app\models\Task
리턴 boolean
    protected function _packageFiles(Project $project, TaskModel $task)
    {
        $version = $task->link_id;
        $files = $task->getCommandFiles();
        $excludes = GlobalHelper::str2arr($project->excludes);
        $packagePath = Project::getDeployPackagePath($version);
        $packageCommand = sprintf('cd %s && tar -p %s -cz -f %s %s', escapeshellarg(rtrim(Project::getDeployWorkspace($version), '/') . '/'), $this->excludes($excludes), escapeshellarg($packagePath), $files);
        $ret = $this->runLocalCommand($packageCommand);
        if (!$ret) {
            throw new \Exception(yii::t('walle', 'package error'));
        }
        return true;
    }