Simplify local Docker image build

This commit is contained in:
Frédéric Guillot
2019-02-27 15:13:49 -08:00
parent 4a40095122
commit 6d2b2f4a79
9 changed files with 50 additions and 52 deletions

View File

@@ -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';
}
/**