Vcs Tasks
GitStack
Runs Git commands in stack. You can use stopOnFail()
to point that stack should be terminated on first fail.
php
<?php
$this->taskGitStack()
->stopOnFail()
->add('-A')
->commit('adding everything')
->push('origin','master')
->tag('0.6.0')
->push('origin','0.6.0')
->run()
$this->taskGitStack()
->stopOnFail()
->add('doc/*')
->commit('doc updated')
->push()
->run();
?>
cloneRepo($repo, $to = null, $branch = null)
Executesgit clone
cloneShallow($repo, $to = null, $branch = null, $depth = null)
Executesgit clone
with depth 1 as defaultadd($pattern)
Executesgit add
command with files to add patterncommit($message, $options = null)
Executesgit commit
command with a messagepull($origin = null, $branch = null)
Executesgit pull
command.push($origin = null, $branch = null)
Executesgit push
commandmerge($branch)
Performs git mergecheckout($branch)
Executesgit checkout
commandtag($tag_name, $message = null)
Executesgit tag
commandexecutable($executable)
*param string
$executableexec($command)
*param string|string[]|CommandInterface
$commandstopOnFail($stopOnFail = null)
*param bool
$stopOnFailresult($result)
setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of command
HgStack
Runs hg commands in stack. You can use stopOnFail()
to point that stack should be terminated on first fail.
php
<?php
$this->hgStack
->cloneRepo('https://bitbucket.org/durin42/hgsubversion')
->pull()
->add()
->commit('changed')
->push()
->tag('0.6.0')
->push('0.6.0')
->run();
?>
cloneRepo($repo, $to = null)
Executeshg clone
add($include = null, $exclude = null)
Executeshg add
command with files to add by patterncommit($message, $options = null)
Executeshg commit
command with a messagepull($branch = null)
Executeshg pull
command.push($branch = null)
Executeshg push
commandmerge($revision = null)
Performs hg mergetag($tag_name, $message = null)
Executeshg tag
commandexecutable($executable)
*param string
$executableexec($command)
*param string|string[]|CommandInterface
$commandstopOnFail($stopOnFail = null)
*param bool
$stopOnFailresult($result)
setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of command
SvnStack
Runs Svn commands in stack. You can use stopOnFail()
to point that stack should be terminated on first fail.
php
<?php
$this->taskSvnStack()
->checkout('http://svn.collab.net/repos/svn/trunk')
->run()
// alternatively
$this->_svnCheckout('http://svn.collab.net/repos/svn/trunk');
$this->taskSvnStack('username', 'password')
->stopOnFail()
->update()
->add('doc/*')
->commit('doc updated')
->run();
?>
update($path = null)
Updatessvn update
commandadd($pattern = null)
Executessvn add
command with files to add patterncommit($message, $options = null)
Executessvn commit
command with a messagecheckout($branch)
Executessvn checkout
commandexecutable($executable)
*param string
$executableexec($command)
*param string|string[]|CommandInterface
$commandstopOnFail($stopOnFail = null)
*param bool
$stopOnFailresult($result)
setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of command