Skip to content

Commit 0d61cfd

Browse files
assignUserkou
andauthored
GH-45155: [Python][CI] Fix path for scientific nightly windows wheel upload (#45222)
### Rationale for this change The upload wasn't failing with the empty, non existent dir. ### What changes are included in this PR? - Fix the path - Prevent the upload from failing silently when no wheels are found ### Are these changes tested? crossbow ### Are there any user-facing changes? no * GitHub Issue: #45155 Lead-authored-by: Jacob Wujciak-Jens <jacob@wujciak.de> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
1 parent fd0b94f commit 0d61cfd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dev/tasks/macros.jinja

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ env:
186186
- name: Upload wheel to Anaconda scientific-python
187187
shell: bash
188188
run: |
189+
# check if completion actually expands to wheel files
190+
# to prevent empty dirs from failing silently
191+
if ! compgen -G "{{ pattern }}" > /dev/null; then
192+
echo "No wheel files found!"
193+
exit 1
194+
fi
189195
python3 -m pip install git+https://github.com/Anaconda-Platform/anaconda-client.git@1.12.3
190196
anaconda -t ${CROSSBOW_SCIENTIFIC_PYTHON_UPLOAD_TOKEN} upload --force -u scientific-python-nightly-wheels --label main {{ pattern }}
191197
env:

dev/tasks/python-wheels/github.windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
9292
{{ macros.github_upload_releases("arrow/python/repaired_wheels/*.whl")|indent }}
9393
{{ macros.github_upload_gemfury("arrow/python/repaired_wheels/*.whl")|indent }}
94-
{{ macros.github_upload_wheel_scientific_python("arrow/repaired_wheels/repaired_wheels/*.whl")|indent }}
94+
{{ macros.github_upload_wheel_scientific_python("arrow/python/repaired_wheels/*.whl")|indent }}
9595

9696
{% if arrow.is_default_branch() %}
9797
- name: Push Docker image

0 commit comments

Comments
 (0)