diff --git a/.gitattributes b/.gitattributes index 6ae8ee7af..4175dd6b3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,4 +8,4 @@ Vagrantfile export-ignore .puppet* eol=lf # Include version information on `git archive' -/application/VERSION export-subst +/application/GITCOMMIT export-subst diff --git a/application/VERSION b/application/GITCOMMIT similarity index 100% rename from application/VERSION rename to application/GITCOMMIT diff --git a/icingaweb2.spec b/icingaweb2.spec index 3ea135589..fc221974e 100644 --- a/icingaweb2.spec +++ b/icingaweb2.spec @@ -204,7 +204,7 @@ rm -rf %{buildroot} %{basedir}/application/forms %{basedir}/application/layouts %{basedir}/application/views -%{basedir}/application/VERSION +%{basedir}/application/GITCOMMIT %{basedir}/doc %{basedir}/modules %{basedir}/public diff --git a/library/Icinga/Application/Version.php b/library/Icinga/Application/Version.php index 0aa29314f..7d8f54fbf 100644 --- a/library/Icinga/Application/Version.php +++ b/library/Icinga/Application/Version.php @@ -17,7 +17,7 @@ class Version */ public static function get() { - if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('VERSION')))) { + if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('GITCOMMIT')))) { $matches = array(); if (@preg_match('/^(?P\w+) (?P\S+)/', $appVersion, $matches)) { $matches['appVersion'] = self::VERSION;