diff --git a/app/Dockerfile b/app/Dockerfile index a30c880c..df5416de 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -23,7 +23,9 @@ RUN cd /build \ && curl -SL https://github.com/bluenviron/mediamtx/releases/download/v${MTX_TAG}/mediamtx_v${MTX_TAG}_linux_${MTX_ARCH:-amd64}.tar.gz \ | tar xzf - -C app \ && cp app/${LIB_ARCH:-amd}.lib usr/local/lib/libIOTCAPIs_ALL.so \ - && rm app/*.txt app/*.lib + && rm app/*.txt app/*.lib \ + && echo BUILD_DATE=$(date) > .build_date + FROM base ARG BUILD diff --git a/app/Dockerfile.hwaccel b/app/Dockerfile.hwaccel index 43a368b5..c3122c02 100644 --- a/app/Dockerfile.hwaccel +++ b/app/Dockerfile.hwaccel @@ -22,7 +22,8 @@ RUN cd /build \ | tar -xzf - -C app --wildcards 'mediamtx*' \ && cp app/amd.lib usr/local/lib/libIOTCAPIs_ALL.so \ && if [ -n "$QSV" ]; then cp -R /usr/lib/x86_64-linux-gnu/ usr/lib/; fi \ - && rm app/*.txt app/*.lib + && rm app/*.txt app/*.lib \ + && echo BUILD_DATE=$(date) > .build_date FROM base ARG BUILD diff --git a/app/Dockerfile.multiarch b/app/Dockerfile.multiarch index 9a22f549..090e4aaf 100644 --- a/app/Dockerfile.multiarch +++ b/app/Dockerfile.multiarch @@ -23,7 +23,8 @@ RUN cd /build \ && curl -SL https://github.com/bluenviron/mediamtx/releases/download/v${MTX_TAG}/mediamtx_v${MTX_TAG}_linux_${MTX_ARCH:-amd64}.tar.gz \ | tar xzf - -C app \ && cp app/${LIB_ARCH:-amd}.lib usr/local/lib/libIOTCAPIs_ALL.so \ - && rm app/*.txt app/*.lib + && rm app/*.txt app/*.lib \ + && echo BUILD_DATE=$(date) > .build_date FROM base_$TARGETARCH ARG BUILD diff --git a/app/Dockerfile.qsv b/app/Dockerfile.qsv index 08581ae5..c6586265 100644 --- a/app/Dockerfile.qsv +++ b/app/Dockerfile.qsv @@ -22,7 +22,8 @@ RUN cd /build \ | tar -xzf - -C app --wildcards 'mediamtx*' \ && cp app/amd.lib usr/local/lib/libIOTCAPIs_ALL.so \ && if [ -n "$QSV" ]; then cp -R /usr/lib/x86_64-linux-gnu/ usr/lib/ && cp -R /usr/bin/ usr/bin; fi \ - && rm app/*.txt app/*.lib + && rm app/*.txt app/*.lib \ + && echo BUILD_DATE=$(date) > .build_date FROM base ARG BUILD diff --git a/app/wyzebridge/config.py b/app/wyzebridge/config.py index 5e58c890..de66b427 100644 --- a/app/wyzebridge/config.py +++ b/app/wyzebridge/config.py @@ -6,10 +6,12 @@ from wyzebridge.hass import setup_hass load_dotenv() +load_dotenv("/.build_date") VERSION: str = getenv("VERSION", "DEV") BUILD = env_bool("BUILD", "local") -BUILD_STR = "" if BUILD == VERSION else f"[{BUILD.upper()} BUILD]" +BUILD_DATE = env_bool("BUILD_DATE") +BUILD_STR = "" if BUILD == VERSION else f"[{BUILD.upper()} BUILD] {BUILD_DATE}" HASS_TOKEN: str = getenv("SUPERVISOR_TOKEN", "") setup_hass(HASS_TOKEN) MQTT_DISCOVERY = env_bool("MQTT_DTOPIC")