This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 41ea19fc4 ci: delete existing npm versions before nightly Gemfury
upload (#4144)
41ea19fc4 is described below
commit 41ea19fc431122bb945e4c7a52be023ed30c5f49
Author: Kent Wu <[email protected]>
AuthorDate: Wed Mar 25 21:28:29 2026 -0400
ci: delete existing npm versions before nightly Gemfury upload (#4144)
This PR attempts to fix an issue where gemfury rejects the nightly npm
upload because an entry with the same version already exists.
---
ci/scripts/gemfury_clean.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/ci/scripts/gemfury_clean.py b/ci/scripts/gemfury_clean.py
index 291e30f9f..1a822628f 100755
--- a/ci/scripts/gemfury_clean.py
+++ b/ci/scripts/gemfury_clean.py
@@ -50,12 +50,17 @@ def main():
print(versions)
versions.sort(key=lambda v: v["created_at"], reverse=True)
- # Always keep at least 1 version
- to_delete = [
- version["id"]
- for version in versions[1:]
- if version["created_at"] < cutoff.isoformat()
- ]
+ # npm registries don't allow re-uploading an existing version, so
all
+ # existing versions must be removed to allow the nightly re-upload
+ if package.get("kind") == "npm":
+ to_delete = [version["id"] for version in versions]
+ else:
+ # Always keep at least 1 version
+ to_delete = [
+ version["id"]
+ for version in versions[1:]
+ if version["created_at"] < cutoff.isoformat()
+ ]
print("Removing", len(to_delete), "version(s) of", len(versions))
for version_id in to_delete: