This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new b83666234c GH-43815: [CI][Packaging][Python] Avoid uploading wheel to
gemfury if version already exists (#43816)
b83666234c is described below
commit b83666234c05d34c23993708160033c259b9ec26
Author: Raúl Cumplido <[email protected]>
AuthorDate: Tue Aug 27 10:30:23 2024 +0200
GH-43815: [CI][Packaging][Python] Avoid uploading wheel to gemfury if
version already exists (#43816)
### What changes are included in this PR?
Check whether version exists on gemfury before trying upload
### Are these changes tested?
Will be tested via archery
### Are there any user-facing changes?
No
* GitHub Issue: #43815
Lead-authored-by: Raúl Cumplido <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
dev/tasks/macros.jinja | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja
index 6423ca0e9e..df55f32222 100644
--- a/dev/tasks/macros.jinja
+++ b/dev/tasks/macros.jinja
@@ -169,10 +169,14 @@ env:
- name: Upload package to Gemfury
shell: bash
run: |
- fury push \
- --api-token=${CROSSBOW_GEMFURY_TOKEN} \
- --as=${CROSSBOW_GEMFURY_ORG} \
- {{ pattern }}
+ if $(fury versions --as=${CROSSBOW_GEMFURY_ORG}
--api-token=${CROSSBOW_GEMFURY_TOKEN} pyarrow | grep --fixed-strings -q "{{
arrow.no_rc_version }}"); then
+ echo "Version {{ arrow.no_rc_version }} already exists. Avoid pushing
version."
+ else
+ fury push \
+ --api-token=${CROSSBOW_GEMFURY_TOKEN} \
+ --as=${CROSSBOW_GEMFURY_ORG} \
+ {{ pattern }}
+ fi
env:
CROSSBOW_GEMFURY_TOKEN: {{ '${{ secrets.CROSSBOW_GEMFURY_TOKEN }}' }}
CROSSBOW_GEMFURY_ORG: {{ '${{ secrets.CROSSBOW_GEMFURY_ORG }}' }}