Rename application/VERSION to application/GITCOMMIT

refs #9247
This commit is contained in:
Alexander A. Klimov 2015-06-05 12:38:55 +02:00
parent 3e99adbe63
commit feb27b8a02
4 changed files with 3 additions and 3 deletions

2
.gitattributes vendored
View File

@ -8,4 +8,4 @@ Vagrantfile export-ignore
.puppet* eol=lf
# Include version information on `git archive'
/application/VERSION export-subst
/application/GITCOMMIT export-subst

View File

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

View File

@ -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<gitCommitID>\w+) (?P<gitCommitDate>\S+)/', $appVersion, $matches)) {
$matches['appVersion'] = self::VERSION;