Re-evaluate how we determine the version number now we are using GIT
This commit is contained in:
parent
664c05decd
commit
775c7751ae
@ -218,18 +218,14 @@ function app_version() {
|
|||||||
$version = trim(fread($f, filesize($version_file)));
|
$version = trim(fread($f, filesize($version_file)));
|
||||||
fclose($f);
|
fclose($f);
|
||||||
|
|
||||||
# We use cvs_prefix, because CVS will translate this on checkout otherwise.
|
$CACHE = preg_replace('/^RELEASE-([0-9\.]+(-.*)+)$/','$1',$version);
|
||||||
$cvs_prefix = '\$Name:';
|
|
||||||
|
|
||||||
$CACHE = preg_replace('/^'.$cvs_prefix.' RELEASE-([0-9_]+)\s*\$$/','$1',$version);
|
|
||||||
$CACHE = preg_replace('/_/','.',$CACHE);
|
|
||||||
|
|
||||||
# Check if we are a CVS copy.
|
# Check if we are a CVS copy.
|
||||||
if (preg_match('/^'.$cvs_prefix.'?\s*\$$/',$CACHE))
|
if (preg_match('/^$/',$CACHE))
|
||||||
$CACHE = 'CVS';
|
$CACHE = 'CVS';
|
||||||
|
|
||||||
# Check if we are special CVS branch
|
# Check if we are special CVS branch
|
||||||
elseif (preg_match('/^'.$cvs_prefix.'?\s*([a-zA-Z]+)?\s*\$$/',$CACHE,$match))
|
elseif (preg_match('/^([a-zA-Z]+)?$/',$CACHE,$match))
|
||||||
$CACHE = $match[1];
|
$CACHE = $match[1];
|
||||||
|
|
||||||
# If return is still the same as version, then the tag is not one we expect.
|
# If return is still the same as version, then the tag is not one we expect.
|
||||||
|
Loading…
Reference in New Issue
Block a user