PHP Class app\components\Git

Inheritance: extends Command
Show file Open project: meolu/walle-web Class Usage Examples

Public Methods

Method Description
getBranchList ( ) : array 获取分支列表
getCommitList ( string $branch = 'master', integer $count = 20 ) : array 获取提交历史
getTagList ( $count = 20 ) : array 获取tag记录
updateRepo ( string $branch = 'master', string $gitDir = null ) : boolean | integer 更新仓库
updateToVersion ( Task $task ) : boolean 更新到指定commit版本

Method Details

getBranchList() public method

获取分支列表
public getBranchList ( ) : array
return array

getCommitList() public method

获取提交历史
public getCommitList ( string $branch = 'master', integer $count = 20 ) : array
$branch string
$count integer
return array

getTagList() public method

获取tag记录
public getTagList ( $count = 20 ) : array
return array

updateRepo() public method

更新仓库
public updateRepo ( string $branch = 'master', string $gitDir = null ) : boolean | integer
$branch string
$gitDir string
return boolean | integer

updateToVersion() public method

更新到指定commit版本
public updateToVersion ( Task $task ) : boolean
$task app\models\Task
return boolean