mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
#46 support for svn > 1.7 from Mike Stupalov
git-svn-id: http://www.observium.org/svn/observer/trunk@3133 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1120,12 +1120,18 @@ if (file_exists($config['install_dir'] . '/.svn/entries'))
|
||||
} else {
|
||||
// SVN version >= 1.7
|
||||
$xml = simplexml_load_string(shell_exec($config['svn'] . ' info --xml'));
|
||||
$svn_rev = $xml->entry->commit->attributes()->revision;
|
||||
$svn_date = $xml->entry->commit->date;
|
||||
if ($xml != false) {
|
||||
$svn_rev = $xml->entry->commit->attributes()->revision;
|
||||
$svn_date = $xml->entry->commit->date;
|
||||
}
|
||||
}
|
||||
list($svn_year, $svn_month, $svn_day) = explode("-", $svn_date);
|
||||
}
|
||||
if (!empty($svn_rev))
|
||||
{
|
||||
$config['version'] = "0." . ($svn_year-2000) . "." . ($svn_month+0) . "." . $svn_rev;
|
||||
} else {
|
||||
# FIXME - $config['release'] not needed
|
||||
$config['version'] = $config['version'] . "." . $config['release'];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user