Move version.txt to app folder
This commit is contained in:
committed by
GitHub
parent
c6b5f4ac5f
commit
55a3b242bf
@@ -20,7 +20,7 @@ RUN apk --no-cache --update add \
|
|||||||
ADD . /var/www/app
|
ADD . /var/www/app
|
||||||
ADD docker/ /
|
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"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
CMD []
|
CMD []
|
||||||
|
|||||||
@@ -198,8 +198,8 @@ function build_app_version($ref, $commit_hash)
|
|||||||
|
|
||||||
if ($commit_hash !== '$Format:%H$') {
|
if ($commit_hash !== '$Format:%H$') {
|
||||||
return 'main.'.$commit_hash;
|
return 'main.'.$commit_hash;
|
||||||
} else if (file_exists('/version.txt')) {
|
} else if (file_exists(__DIR__ . '/version.txt')) {
|
||||||
return rtrim(file_get_contents('/version.txt'));
|
return rtrim(file_get_contents(__DIR__ . '/version.txt'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'main.unknown_revision';
|
return 'main.unknown_revision';
|
||||||
|
|||||||
Reference in New Issue
Block a user