Skip to content

Commit

Permalink
apacheGH-43815: [CI][Packaging][Python] Avoid uploading wheel to gemf…
Browse files Browse the repository at this point in the history
…ury if version already exists (apache#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: apache#43815

Lead-authored-by: Raúl Cumplido <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
  • Loading branch information
raulcd and kou authored Aug 27, 2024
1 parent c30bb6a commit b836662
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dev/tasks/macros.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}' }}
Expand Down

0 comments on commit b836662

Please sign in to comment.