Fix CI: release grep exit code, golangci-lint v2 config version
Some checks failed
CI / lint (push) Failing after 34s
CI / test (push) Successful in 30s
Release / build (push) Successful in 2m38s

Release pipeline crashed when no prior release existed because
grep returned exit 1 (no match) under set -e. Add || true.

golangci-lint v2 requires a version: "2" field in .golangci.yml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Axel Meyer
2026-03-04 00:57:39 +01:00
parent 59a98843f7
commit 5683621874
2 changed files with 3 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ jobs:
# Delete existing release for this tag (re-release support)
EXISTING=$(curl -s "${API}/releases/tags/${TAG}" \
-H "Authorization: token ${TOKEN}" \
| grep -o '"id":[0-9]*' | grep -m1 -o '[0-9]*')
| grep -o '"id":[0-9]*' | grep -m1 -o '[0-9]*' || true)
if [ -n "$EXISTING" ]; then
curl -s -X DELETE "${API}/releases/${EXISTING}" \
-H "Authorization: token ${TOKEN}"

View File

@@ -1,3 +1,5 @@
version: "2"
linters:
enable:
- errcheck