From 4cf164d4bce2656c3b388435ff8dafa7eae7fa8b Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 18 Oct 2024 10:45:08 +0200 Subject: [PATCH] add commit footer for docker --- .env.example | 1 - docker/devicehub-django.entrypoint.sh | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 1495f9d..37ed087 100644 --- a/.env.example +++ b/.env.example @@ -14,7 +14,6 @@ EMAIL_USE_TLS=True EMAIL_BACKEND="django.core.mail.backends.smtp.EmailBackend" EMAIL_FILE_PATH="/tmp/app-messages" ENABLE_EMAIL=false -COMMIT=$(git log --format="%H %ad" --date=iso -n 1) PREDEFINED_TOKEN='5018dd65-9abd-4a62-8896-80f34ac66150' # TODO review these vars #SNAPSHOTS_DIR=/path/to/TODO diff --git a/docker/devicehub-django.entrypoint.sh b/docker/devicehub-django.entrypoint.sh index e5773f3..bdf1008 100644 --- a/docker/devicehub-django.entrypoint.sh +++ b/docker/devicehub-django.entrypoint.sh @@ -12,6 +12,10 @@ check_app_is_there() { } deploy() { + # TODO this is weird, find better workaround + git config --global --add safe.directory /opt/devicehub-django + export COMMIT=$(git log --format="%H %ad" --date=iso -n 1) + if [ "${DEBUG:-}" = 'true' ]; then ./manage.py print_settings fi