Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Björn Fischer
z-push
Commits
4f93756d
Commit
4f93756d
authored
Aug 14, 2015
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-636 #comment read last commit from 'git log'. If git is not available
only "GIT" will be displayed.
parent
1e51bf35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
version.php
src/version.php
+7
-6
No files found.
src/version.php
View file @
4f93756d
...
...
@@ -6,7 +6,7 @@
*
* Created : 18.04.2008
*
* Copyright 2007 - 2013 Zarafa Deutschland GmbH
* Copyright 2007 - 2013
, 2015
Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
...
...
@@ -42,12 +42,13 @@
************************************************/
if
(
!
defined
(
"ZPUSH_VERSION"
))
{
if
(
file_exists
(
".svn/entries"
))
{
$svn
=
file
(
".svn/entries"
);
define
(
"ZPUSH_VERSION"
,
"SVN "
.
substr
(
trim
(
$svn
[
4
]),
stripos
(
$svn
[
4
],
"z-push"
)
+
7
)
.
" r"
.
trim
(
$svn
[
3
]));
$commit
=
exec
(
"type git && git log --date=short --pretty=format:'%h/%ad' -1"
);
if
(
preg_match
(
"/^[\da-f]+\/\d
{
4}-\d{2}-\d{2
}
$/i"
,
$commit
))
{
define
(
"ZPUSH_VERSION"
,
"GIT "
.
$commit
);
}
else
{
define
(
"ZPUSH_VERSION"
,
"GIT"
);
}
else
define
(
"ZPUSH_VERSION"
,
"SVN checkout"
);
}
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment