Fix CI: release grep exit code, golangci-lint v2 config version
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:
@@ -97,7 +97,7 @@ jobs:
|
|||||||
# Delete existing release for this tag (re-release support)
|
# Delete existing release for this tag (re-release support)
|
||||||
EXISTING=$(curl -s "${API}/releases/tags/${TAG}" \
|
EXISTING=$(curl -s "${API}/releases/tags/${TAG}" \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-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
|
if [ -n "$EXISTING" ]; then
|
||||||
curl -s -X DELETE "${API}/releases/${EXISTING}" \
|
curl -s -X DELETE "${API}/releases/${EXISTING}" \
|
||||||
-H "Authorization: token ${TOKEN}"
|
-H "Authorization: token ${TOKEN}"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- errcheck
|
- errcheck
|
||||||
|
|||||||
Reference in New Issue
Block a user