optimise versionstring handling (#159)
- Reading the version string from the image updates it even if the image is re-pulled without re-deployment
This commit is contained in:
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [unreleased]
|
## [unreleased]
|
||||||
|
|
||||||
|
- Reading the version string from the image updates it even if the image is re-pulled without re-deployment
|
||||||
|
|
||||||
## [0.10.1] - 2024-08-10
|
## [0.10.1] - 2024-08-10
|
||||||
|
|
||||||
- fix displaying the version string at startup and in HA [#153](https://github.com/s-allius/tsun-gen3-proxy/issues/153)
|
- fix displaying the version string at startup and in HA [#153](https://github.com/s-allius/tsun-gen3-proxy/issues/153)
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ ARG GID
|
|||||||
ARG LOG_LVL
|
ARG LOG_LVL
|
||||||
ARG environment
|
ARG environment
|
||||||
|
|
||||||
ENV VERSION=$VERSION
|
|
||||||
ENV SERVICE_NAME=$SERVICE_NAME
|
ENV SERVICE_NAME=$SERVICE_NAME
|
||||||
ENV UID=$UID
|
ENV UID=$UID
|
||||||
ENV GID=$GID
|
ENV GID=$GID
|
||||||
@@ -63,6 +62,7 @@ RUN python -m pip install --no-cache --no-index /root/wheels/* && \
|
|||||||
COPY --chmod=0700 entrypoint.sh /root/entrypoint.sh
|
COPY --chmod=0700 entrypoint.sh /root/entrypoint.sh
|
||||||
COPY config .
|
COPY config .
|
||||||
COPY src .
|
COPY src .
|
||||||
|
RUN echo ${VERSION} > /proxy-version.txt
|
||||||
RUN date > /build-date.txt
|
RUN date > /build-date.txt
|
||||||
EXPOSE 5005 8127 10000
|
EXPOSE 5005 8127 10000
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
user="$(id -u)"
|
user="$(id -u)"
|
||||||
|
export VERSION=$(cat /proxy-version.txt)
|
||||||
|
|
||||||
echo "######################################################"
|
echo "######################################################"
|
||||||
echo "# prepare: '$SERVICE_NAME' Version:$VERSION"
|
echo "# prepare: '$SERVICE_NAME' Version:$VERSION"
|
||||||
echo "# for running with UserID:$UID, GroupID:$GID"
|
echo "# for running with UserID:$UID, GroupID:$GID"
|
||||||
|
|||||||
Reference in New Issue
Block a user