/[drupal]/contributions/modules/cvs_deploy/cvs_deploy.module
ViewVC logotype

Diff of /contributions/modules/cvs_deploy/cvs_deploy.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9.2.8, Wed Oct 1 22:54:38 2008 UTC revision 1.9.2.9, Wed Nov 19 18:37:16 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: cvs_deploy.module,v 1.9.2.7 2008/01/23 21:00:28 dww Exp $  // $Id: cvs_deploy.module,v 1.9.2.8 2008/10/01 22:54:38 dww Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 8  Line 8 
8   * directly via a CVS workspace (as opposed to sites built from packaged   * directly via a CVS workspace (as opposed to sites built from packaged
9   * releases that are downloaded from drupal.org).   * releases that are downloaded from drupal.org).
10   *   *
11   * See the README.txt file for more information.   * See the README.txt file for more information.
12   *   *
13   * @author Derek Wright ("dww") http://drupal.org/user/46549   * @author Derek Wright ("dww") http://drupal.org/user/46549
14   */   */
# Line 23  function cvs_deploy_version_from_tag($ta Line 23  function cvs_deploy_version_from_tag($ta
23      $version = 'HEAD';      $version = 'HEAD';
24    }    }
25    // See if it's a full, official release from a tag:    // See if it's a full, official release from a tag:
26    else if (preg_match('@^DRUPAL-(\d+)--(\d+)-(\d+)(-.+)?@', $tag, $match)) {    elseif (preg_match('@^DRUPAL-(\d+)--(\d+)-(\d+)(-.+)?@', $tag, $match)) {
27      $version = $match[1] .'.x-'. $match[2] .'.'. $match[3];      $version = $match[1] .'.x-'. $match[2] .'.'. $match[3];
28      if (isset($match[4])) {      if (isset($match[4])) {
29        // This version's tag has 'extra', so clean that up.        // This version's tag has 'extra', so clean that up.
# Line 31  function cvs_deploy_version_from_tag($ta Line 31  function cvs_deploy_version_from_tag($ta
31      }      }
32    }    }
33    // If not, see if it's from a branch (like a development snapshot).    // If not, see if it's from a branch (like a development snapshot).
34    else if (preg_match('@^DRUPAL-(\d+)(--(\d+))?@', $tag, $match)) {    elseif (preg_match('@^DRUPAL-(\d+)(--(\d+))?@', $tag, $match)) {
35      $version = $match[1] .'.x-'. (isset($match[3]) ? $match[3] : '1') .'.x-dev';      $version = $match[1] .'.x-'. (isset($match[3]) ? $match[3] : '1') .'.x-dev';
36    }    }
37    return $version;    return $version;
# Line 94  function _cvs_deploy_version_alter(&$ver Line 94  function _cvs_deploy_version_alter(&$ver
94    elseif (preg_match('/\$'.'Name: (.*?)\$/', $version, $match)) {    elseif (preg_match('/\$'.'Name: (.*?)\$/', $version, $match)) {
95      $version = cvs_deploy_version_from_tag(trim($match[1]));      $version = cvs_deploy_version_from_tag(trim($match[1]));
96    }    }
97    
98    if (function_exists('update_status_get_available') && $version == 'HEAD') {    if (function_exists('update_status_get_available') && $version == 'HEAD') {
99      // If there's available update_status data, we can use the version string      // If there's available update_status data, we can use the version string
100      // the release node pointing to HEAD really has. However, we can only      // the release node pointing to HEAD really has. However, we can only

Legend:
Removed from v.1.9.2.8  
changed lines
  Added in v.1.9.2.9

  ViewVC Help
Powered by ViewVC 1.1.2