Move version.txt to app folder
This commit is contained in:
parent
c6b5f4ac5f
commit
55a3b242bf
|
|
@ -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 []
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue