From 55a3b242bf33d37ec6dafaa565df70cc96a7abde Mon Sep 17 00:00:00 2001 From: Marco van Duijvenbode Date: Thu, 29 Sep 2022 04:42:35 +0200 Subject: [PATCH] Move version.txt to app folder --- Dockerfile | 2 +- app/functions.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 95d4a3f95..52862f9d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apk --no-cache --update add \ ADD . /var/www/app ADD docker/ / -RUN rm -rf /var/www/app/docker && echo $VERSION > /version.txt +RUN rm -rf /var/www/app/docker && echo $VERSION > /var/www/app/app/version.txt ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD [] diff --git a/app/functions.php b/app/functions.php index e5d548ec5..e31af246f 100644 --- a/app/functions.php +++ b/app/functions.php @@ -198,8 +198,8 @@ function build_app_version($ref, $commit_hash) if ($commit_hash !== '$Format:%H$') { return 'main.'.$commit_hash; - } else if (file_exists('/version.txt')) { - return rtrim(file_get_contents('/version.txt')); + } else if (file_exists(__DIR__ . '/version.txt')) { + return rtrim(file_get_contents(__DIR__ . '/version.txt')); } return 'main.unknown_revision';