fix(ci): QUICK-REF-MAX marker is ABOVE data row, not below
The workflow read MARKER-1 (line above marker = separator line), returning '-----------------' as the version. The data row is BELOW the marker. Fixed both read and update steps to use MARKER+1. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
6fc74fd648
commit
84452c2a18
1 file changed
+5
-5
@@ -34,10 +34,10 @@ jobs:
|
|||||||
NEW_VERSION="${NEW_VERSION#v}"
|
NEW_VERSION="${NEW_VERSION#v}"
|
||||||
echo "New Gitea version: $NEW_VERSION"
|
echo "New Gitea version: $NEW_VERSION"
|
||||||
|
|
||||||
# Read current max-tested from the TRACKER:QUICK-REF-MAX marker line above it
|
# Read current max-tested: data row is directly BELOW the TRACKER:QUICK-REF-MAX marker
|
||||||
MARKER_LINE=$(grep -n 'TRACKER:QUICK-REF-MAX' COMPATIBILITY.md | cut -d: -f1)
|
MARKER_LINE=$(grep -n 'TRACKER:QUICK-REF-MAX' COMPATIBILITY.md | cut -d: -f1)
|
||||||
# Extract the last **X.Y.Z** from the Quick Reference row (4th pipe column)
|
# Extract the last **X.Y.Z** from the Quick Reference row (4th pipe column)
|
||||||
CURRENT=$(sed -n "$((MARKER_LINE - 1))p" COMPATIBILITY.md | awk -F'|' '{gsub(/\*| /, "", $4); print $4}')
|
CURRENT=$(sed -n "$((MARKER_LINE + 1))p" COMPATIBILITY.md | awk -F'|' '{gsub(/\*| /, "", $4); print $4}')
|
||||||
echo "Current max tested: $CURRENT"
|
echo "Current max tested: $CURRENT"
|
||||||
|
|
||||||
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||||
@@ -55,9 +55,9 @@ jobs:
|
|||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
run: |
|
run: |
|
||||||
NEW="${{ steps.version.outputs.new_version }}"
|
NEW="${{ steps.version.outputs.new_version }}"
|
||||||
# The Quick Reference row is the line directly above TRACKER:QUICK-REF-MAX
|
# The Quick Reference data row is the line directly BELOW TRACKER:QUICK-REF-MAX
|
||||||
MARKER=$(grep -n 'TRACKER:QUICK-REF-MAX' COMPATIBILITY.md | cut -d: -f1)
|
MARKER=$(grep -n 'TRACKER:QUICK-REF-MAX' COMPATIBILITY.md | cut -d: -f1)
|
||||||
TARGET=$((MARKER - 1))
|
TARGET=$((MARKER + 1))
|
||||||
# Update column 4 (Max Tested) and column 5 (Status) in the pipe-separated row
|
# Update column 4 (Max Tested) and column 5 (Status) in the pipe-separated row
|
||||||
awk -i inplace -F'|' -v OFS='|' -v ver="${NEW}" '
|
awk -i inplace -F'|' -v OFS='|' -v ver="${NEW}" '
|
||||||
NR == '$TARGET' { $4 = " **" ver "** "; $5 = " ⏳ Pending Verification " }
|
NR == '$TARGET' { $4 = " **" ver "** "; $5 = " ⏳ Pending Verification " }
|
||||||
@@ -105,7 +105,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
branch: track/gitea-${{ steps.version.outputs.new_version }}
|
branch: track/gitea-${{ steps.version.outputs.new_version }}
|
||||||
commit-message: "docs: track Gitea ${{ steps.version.outputs.new_version }} — pending verification"
|
commit-message: "docs: track Gitea ${{ steps.version.outputs.new_version }} — pending verification"
|
||||||
title: "⬆️ Track Gitea ${{ steps.version.outputs.new_version }} — ⏳ Pending Verification"
|
title: "Track Gitea ${{ steps.version.outputs.new_version }} — ⏳ Pending Verification"
|
||||||
body: |
|
body: |
|
||||||
Gitea **${{ steps.version.outputs.new_version }}** has been released.
|
Gitea **${{ steps.version.outputs.new_version }}** has been released.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user