diff --git a/Dockerfile b/Dockerfile index 26ee0c01..ca535ea6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,14 +51,19 @@ ENV PATH "/root/.local/bin:$PATH" COPY pyproject.toml poetry.lock README.md /package/ COPY --from=python_test_base /package/src /package/src +ARG CONDUCTOR_PYTHON_VERSION +ENV CONDUCTOR_PYTHON_VERSION=${CONDUCTOR_PYTHON_VERSION} +RUN if [ -z "$CONDUCTOR_PYTHON_VERSION" ]; then \ + echo "CONDUCTOR_PYTHON_VERSION build arg is required." >&2; exit 1; \ + fi && \ + poetry version "$CONDUCTOR_PYTHON_VERSION" + RUN poetry config virtualenvs.create false && \ poetry install --only main --no-root --no-interaction --no-ansi && \ poetry install --no-root --no-interaction --no-ansi ENV PYTHONPATH /package/src -ARG CONDUCTOR_PYTHON_VERSION -ENV CONDUCTOR_PYTHON_VERSION ${CONDUCTOR_PYTHON_VERSION} RUN poetry build ARG PYPI_USER ARG PYPI_PASS diff --git a/pyproject.toml b/pyproject.toml index 81a2876e..22180460 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "conductor-python" -version = "1.2.3" # TODO: Make version number derived from GitHub release number +version = "0.0.0" # Do not change! Placeholder. Real version injected during build (edited) description = "Python SDK for working with https://github.com/conductor-oss/conductor" authors = ["Orkes "] license = "Apache-2.0"