Move version.txt to app folder

This commit is contained in:
Marco van Duijvenbode 2022-09-29 04:42:35 +02:00 committed by GitHub
parent c6b5f4ac5f
commit 55a3b242bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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 []

View File

@ -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';