Skip to content

Commit 0f5166e

Browse files
authored
fix(release): modify build_command in pyproject.toml (#835)
* Update release-and-publish.yml: remove build_command * Update pyproject.toml: add PYTHON_PATH to build_command * Update pyproject.toml: increase verbosity
1 parent 88fca89 commit 0f5166e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/release-and-publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ jobs:
205205
github_token: ${{ secrets.ADMIN_TOKEN }} # Use the new token for authentication
206206
git_committer_name: "OpenAdapt Bot"
207207
git_committer_email: "[email protected]"
208-
build_command: "pip install poetry && poetry env use $PYTHON_PATH/python3.10 && poetry build"
209208
- name: Upload release assets
210209
env:
211210
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pyproject.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,15 @@ upload_to_PyPI = false
156156
upload_to_release = true
157157
upload_to_repository = false
158158
repository_url = "https://upload.pypi.org/legacy/"
159-
build_command = "pip install poetry && poetry env use python3.10 && poetry build"
159+
build_command = """
160+
pip install poetry && \
161+
echo "PYTHON_PATH is set to: $PYTHON_PATH" && \
162+
if [ -z \"$PYTHON_PATH\" ]; then \
163+
echo "PYTHON_PATH is empty, using default python3.10" && \
164+
poetry env use python3.10; \
165+
else \
166+
echo "Using python from PYTHON_PATH: $PYTHON_PATH/python3.10" && \
167+
poetry env use $PYTHON_PATH/python3.10; \
168+
fi && \
169+
poetry build
170+
"""

0 commit comments

Comments
 (0)