From 556379a80695c67db870c10a924ce03223dfa7d2 Mon Sep 17 00:00:00 2001 From: cinco euzebio Date: Sat, 28 Feb 2026 23:17:56 -0300 Subject: [PATCH] fix(ci): delete existing package before PUT to avoid 409 Gitea generic packages returns 409 if file already exists at same version. Delete the version first, then re-upload. Co-Authored-By: Claude Sonnet 4.6 --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index 1c1a4cb..e352296 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,6 +31,9 @@ steps: else FILL="#e05d44"; fi echo "PCT=$PCT FILL=$FILL" printf 'coverage%s%%' "$FILL" "$PCT" > coverage.svg + curl -s -X DELETE \ + -H "Authorization: token $GITEA_TOKEN" \ + "https://git.cincoeuzebio.com/api/v1/packages/cinco/generic/badges/latest" || true curl -fsSL -X PUT \ -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: image/svg+xml" \