summaryrefslogtreecommitdiff
path: root/app/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/functions.php')
-rw-r--r--app/functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/functions.php b/app/functions.php
index bb739d0f..fc278029 100644
--- a/app/functions.php
+++ b/app/functions.php
@@ -166,8 +166,6 @@ function array_column_sum(array &$input, $column)
*/
function build_app_version($ref, $commit_hash)
{
- $version = 'master';
-
if ($ref !== '$Format:%d$') {
$tag = preg_replace('/\s*\(.*tag:\sv([^,]+).*\)/i', '\1', $ref);
@@ -177,10 +175,12 @@ function build_app_version($ref, $commit_hash)
}
if ($commit_hash !== '$Format:%H$') {
- $version .= '.'.$commit_hash;
+ return 'master.'.$commit_hash;
+ } else if (file_exists('/version.txt')) {
+ return file_get_contents('/version.txt');
}
- return $version;
+ return 'master.unknown_revision';
}
/**