Logo Search packages:      
Sourcecode: aegir-provision version File versions  Download package

_provision_cvs_deploy_version_alter ( &$  version,

Private helper to alter the version of a module based on what we can figure out about the CVS tag in use.

Definition at line 56 of file cvs_deploy.inc.

References _provision_cvs_deploy_version_from_tag().

Referenced by _provision_cvs_deploy().

  static $available = array();
  $match = array();
  if (empty($version)) {
    // The .info file contains no version data. Find the version based
    // on the sticky tag in the local workspace (the CVS/Tag file).
    $cvs_dir = dirname($file->filename) .'/CVS';
    if (is_dir($cvs_dir)) {
      $tag = '';  // If there's no Tag file, there's no tag, a.k.a. HEAD.
      if (file_exists($cvs_dir .'/Tag')) {
        $tag_file = trim(file_get_contents($cvs_dir .'/Tag'));
        if ($tag_file) {
          // Get the sticky tag for this workspace: strip off the leading 'T'.
          $tag = preg_replace('@^(T|N)@', '', $tag_file);
      $version = _provision_cvs_deploy_version_from_tag($tag);
  // The weird concatenation prevents CVS from 'expanding' this $Name.
  elseif (preg_match('/\$'.'Name: (.*?)\$/', $version, $match)) {
    $version = _provision_cvs_deploy_version_from_tag(trim($match[1]));

Generated by  Doxygen 1.6.0   Back to index