Skip to content

Commit 78100b2

Browse files
Automate build python sdk with version from the github release (#367) (#368)
Co-authored-by: IgorChvyrov-sm <igor.chvyrov@siliconmint.com>
1 parent 5f6f6ee commit 78100b2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,19 @@ ENV PATH "/root/.local/bin:$PATH"
5151
COPY pyproject.toml poetry.lock README.md /package/
5252
COPY --from=python_test_base /package/src /package/src
5353

54+
ARG CONDUCTOR_PYTHON_VERSION
55+
ENV CONDUCTOR_PYTHON_VERSION=${CONDUCTOR_PYTHON_VERSION}
56+
RUN if [ -z "$CONDUCTOR_PYTHON_VERSION" ]; then \
57+
echo "CONDUCTOR_PYTHON_VERSION build arg is required." >&2; exit 1; \
58+
fi && \
59+
poetry version "$CONDUCTOR_PYTHON_VERSION"
60+
5461
RUN poetry config virtualenvs.create false && \
5562
poetry install --only main --no-root --no-interaction --no-ansi && \
5663
poetry install --no-root --no-interaction --no-ansi
5764

5865
ENV PYTHONPATH /package/src
5966

60-
ARG CONDUCTOR_PYTHON_VERSION
61-
ENV CONDUCTOR_PYTHON_VERSION ${CONDUCTOR_PYTHON_VERSION}
6267
RUN poetry build
6368
ARG PYPI_USER
6469
ARG PYPI_PASS

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "conductor-python"
7-
version = "1.2.3" # TODO: Make version number derived from GitHub release number
7+
version = "0.0.0" # Do not change! Placeholder. Real version injected during build (edited)
88
description = "Python SDK for working with https://github.com/conductor-oss/conductor"
99
authors = ["Orkes <developers@orkes.io>"]
1010
license = "Apache-2.0"

0 commit comments

Comments
 (0)