release: match indented PFUI_CLASSIC_API_LATEST in pin step

Wrapping the version-check block in a do…end indented every constant
by two spaces, so the sed pattern's ^local anchor stopped matching and
the followup grep returned exit 1, killing the step under bash -e.

Captures the leading whitespace into \1 so the indent is preserved
through the substitution, and matches the two-space alignment between
LATEST and = so we don't accidentally hit LATEST_URL on the line below.
This commit is contained in:
Brues
2026-06-22 15:46:27 -05:00
parent 79003c0c9a
commit ef94f90876
+2 -2
View File
@@ -23,8 +23,8 @@ jobs:
IFS=. read -r MAJOR MINOR PATCH <<<"$LATEST"
PACKED=$((MAJOR * 10000 + MINOR * 100 + PATCH))
echo "Pinning PFUI_CLASSIC_API_LATEST to $LATEST ($PACKED)"
sed -i "s/^local PFUI_CLASSIC_API_LATEST = [0-9]*/local PFUI_CLASSIC_API_LATEST = $PACKED/" pfUI.lua
grep '^local PFUI_CLASSIC_API_' pfUI.lua
sed -i "s/^\([[:space:]]*\)local PFUI_CLASSIC_API_LATEST = [0-9]*/\1local PFUI_CLASSIC_API_LATEST = $PACKED/" pfUI.lua
grep 'local PFUI_CLASSIC_API_' pfUI.lua
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}