Revert "Rename application/VERSION to application/GITCOMMIT"

This reverts commit feb27b8a02.
This commit is contained in:
Eric Lippmann 2015-09-30 18:37:48 +02:00
parent cdc534f04d
commit 3cd3a7891c
4 changed files with 3 additions and 4 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -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

View File

@ -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);