diff options
author | Frédéric Guillot <fred@kanboard.net> | 2019-02-27 15:13:49 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2019-02-27 17:50:18 -0800 |
commit | 6d2b2f4a793fe6f9321fa5ed164af1fd3520e01b (patch) | |
tree | e3eef95cd2979946e0f27ca9cbcc8ab57b061c3c /app/functions.php | |
parent | 4a400951226da20f05472504a5e992981298734e (diff) |
Simplify local Docker image build
Diffstat (limited to 'app/functions.php')
-rw-r--r-- | app/functions.php | 8 |
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'; } /** |