function drush_make_resolve_git_revision

master drush_make_resolve_git_revision($project)

Resolve revision for a git-based project.

1 call to drush_make_resolve_git_revision()
drush_make_resolve_git_refs in commands/make/
Resolve branches and revisions for git-based projects.


commands/make/, line 216
Functions for the generate makefile command.


function drush_make_resolve_git_revision($project) {
  drush_log(dt('Resolving head commit on `:branch` branch for repo at: :repo', array(':branch' => $project['download']['branch'], ':repo' => $project['download']['url'])));
  if (drush_shell_exec("git ls-remote %s %s", $project['download']['url'], $project['download']['branch'])) {
    $head_output = drush_shell_exec_output();
    list($revision) = explode("\t", $head_output[0]);
    drush_log(dt('Resolved git revision to: :revision', array(':revision' => $revision)));
    return $revision;
  else {
    drush_log(dt('Could not resolve head commit for `:project` using git repo at :repo', array(':project' => $project['name'], ':repo' => $project['download']['url'])), 'warning');