You are here

protected function RoboFile::getCurrentBranch in Panopoly 7

Gets the Git branch that is currently checked out.

Return value

string

3 calls to RoboFile::getCurrentBranch()
RoboFile::releaseCreate in ./RoboFile.php
Release Stage 1: results in local tag and commit for the new version.
RoboFile::releasePush in ./RoboFile.php
Release Stage 2: Pushes commits and tags to the Git remote.
RoboFile::subtreeSplit in ./RoboFile.php
Does a subtree-split into the individual panopoly_* features' manyrepos.

File

./RoboFile.php, line 158

Class

RoboFile
This is project's console commands configuration for Robo task runner.

Code

protected function getCurrentBranch() {
  $process = new Process('git rev-parse --abbrev-ref HEAD');
  $process
    ->setTimeout(NULL);
  $process
    ->run();
  return trim($process
    ->getOutput());
}