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 clonecloneShallow($repo, $to = null, $branch = null, $depth = null)Executesgit clonewith depth 1 as defaultadd($pattern)Executesgit addcommand with files to add patterncommit($message, $options = null)Executesgit commitcommand with a messagepull($origin = null, $branch = null)Executesgit pullcommand.push($origin = null, $branch = null)Executesgit pushcommandmerge($branch)Performs git mergecheckout($branch)Executesgit checkoutcommandtag($tag_name, $message = null)Executesgit tagcommandexecutable($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 cloneadd($include = null, $exclude = null)Executeshg addcommand with files to add by patterncommit($message, $options = null)Executeshg commitcommand with a messagepull($branch = null)Executeshg pullcommand.push($branch = null)Executeshg pushcommandmerge($revision = null)Performs hg mergetag($tag_name, $message = null)Executeshg tagcommandexecutable($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 updatecommandadd($pattern = null)Executessvn addcommand with files to add patterncommit($message, $options = null)Executessvn commitcommand with a messagecheckout($branch)Executessvn checkoutcommandexecutable($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