function DrushMakeProject::processGitInfoFiles

8.0.x DrushMakeProject::processGitInfoFiles()
6.x DrushMakeProject::processGitInfoFiles()
7.x DrushMakeProject::processGitInfoFiles()
5.x DrushMakeProject::processGitInfoFiles()
master DrushMakeProject::processGitInfoFiles()

Process info files when downloading things from git.

1 call to DrushMakeProject::processGitInfoFiles()
DrushMakeProject::make in commands/make/
Build a project.


commands/make/, line 338
Drush Make processing classes.


The base project class.


function processGitInfoFiles() {
  // Bail out if this isn't hosted on
  if (isset($this->download['url']) && strpos($this->download['url'], '') === FALSE) {

  // Figure out the proper version string to use based on the .make file.
  // Best case is the .make file author told us directly.
  if (!empty($this->download['full_version'])) {
    $full_version = $this->download['full_version'];
  // Next best is if we have a tag, since those are identical to versions.
  elseif (!empty($this->download['tag'])) {
    $full_version = $this->download['tag'];
  // If we have a branch, append '-dev'.
  elseif (!empty($this->download['branch'])) {
    $full_version = $this->download['branch'] . '-dev';
  // Ugh. Not sure what else we can do in this case.
  elseif (!empty($this->download['revision'])) {
    $full_version = $this->download['revision'];
  // Probably can never reach this case.
  else {
    $full_version = 'unknown';

  // If the version string ends in '.x-dev' do the Git magic to figure out
  // the appropriate 'rebuild version' string, e.g. '7.x-1.2+7-dev'.
  $matches = array();
  if (preg_match('/^(.+).x-dev$/', $full_version, $matches)) {
    require_once dirname(__FILE__) . '/../pm/package_handler/';
    $rebuild_version = drush_pm_git_drupalorg_compute_rebuild_version($this->download_location, $matches[1]);
    if ($rebuild_version) {
      $full_version = $rebuild_version;
  require_once dirname(__FILE__) . '/../pm/';
  drush_pm_inject_info_file_metadata($this->download_location, $this->name, $full_version);