Revert "Rename application/VERSION to application/GITCOMMIT"
This reverts commit feb27b8a02
.
This commit is contained in:
parent
cdc534f04d
commit
3cd3a7891c
|
@ -8,4 +8,4 @@ Vagrantfile export-ignore
|
||||||
.puppet* eol=lf
|
.puppet* eol=lf
|
||||||
|
|
||||||
# Include version information on `git archive'
|
# Include version information on `git archive'
|
||||||
/application/GITCOMMIT export-subst
|
/application/VERSION export-subst
|
||||||
|
|
|
@ -204,7 +204,7 @@ rm -rf %{buildroot}
|
||||||
%{basedir}/application/forms
|
%{basedir}/application/forms
|
||||||
%{basedir}/application/layouts
|
%{basedir}/application/layouts
|
||||||
%{basedir}/application/views
|
%{basedir}/application/views
|
||||||
%{basedir}/application/GITCOMMIT
|
%{basedir}/application/VERSION
|
||||||
%{basedir}/doc
|
%{basedir}/doc
|
||||||
%{basedir}/modules
|
%{basedir}/modules
|
||||||
%{basedir}/public
|
%{basedir}/public
|
||||||
|
|
|
@ -18,8 +18,7 @@ class Version
|
||||||
public static function get()
|
public static function get()
|
||||||
{
|
{
|
||||||
$version = array('appVersion' => self::VERSION);
|
$version = array('appVersion' => self::VERSION);
|
||||||
|
if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('VERSION')))) {
|
||||||
if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('GITCOMMIT')))) {
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (@preg_match('/^(?P<gitCommitID>\w+) (?P<gitCommitDate>\S+)/', $appVersion, $matches)) {
|
if (@preg_match('/^(?P<gitCommitID>\w+) (?P<gitCommitDate>\S+)/', $appVersion, $matches)) {
|
||||||
return array_merge($version, $matches);
|
return array_merge($version, $matches);
|
||||||
|
|
Loading…
Reference in New Issue