fix: set SETUPTOOLS_SCM_PRETEND_VERSION in Dockerfile for hatch-vcs

This commit is contained in:
2026-04-25 17:31:36 +10:00
parent cf854a2ace
commit 33e7365a88
+3 -1
View File
@@ -33,7 +33,9 @@ COPY --chown=appuser:appuser pyproject.toml uv.lock README.md ./
# Switch to appuser and install Python dependencies
USER appuser
ARG VERSION=dev
RUN HATCH_VCS_PRETEND_VERSION=${VERSION} uv sync --frozen
ENV HATCH_VCS_PRETEND_VERSION=${VERSION} \
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}
RUN uv sync --frozen
# Copy application source
COPY --chown=appuser:appuser src/ ./src/