| 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 |
| 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 |
*/ |
*/ |
| 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. |
| 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; |
| 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 |