mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
classicapi: default LATEST to MIN so source builds never soft-nudge
Replaces the 99999999 sentinel with `LATEST = MIN`. The elseif `< LATEST` then reduces to `< MIN` on source builds, which the preceding `if` branch always catches first — so the soft-nudge never fires for unpinned installs. No explicit guard needed. A source/cloned install previously showed "ClassicAPI v9999.99.99 is available" because the sentinel leaked into FormatVersion before the release workflow could patch it. With this layout, source installs are silent and only properly-pinned release zips trigger the nudge. Workflow sed broadens to "= .*" so it overwrites the line regardless of whether the RHS is a digit string or a Lua identifier.
This commit is contained in:
@@ -23,7 +23,7 @@ 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/^\([[:space:]]*\)local PFUI_CLASSIC_API_LATEST = [0-9]*/\1local PFUI_CLASSIC_API_LATEST = $PACKED/" pfUI.lua
|
||||
sed -i "s/^\([[:space:]]*\)local PFUI_CLASSIC_API_LATEST = .*/\1local PFUI_CLASSIC_API_LATEST = $PACKED/" pfUI.lua
|
||||
grep 'local PFUI_CLASSIC_API_' pfUI.lua
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -28,7 +28,7 @@ do
|
||||
-- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus
|
||||
-- API surface that ClassicAPI polyfills, so presence is required.
|
||||
local PFUI_CLASSIC_API_MIN = 10403 -- (X*10000 + Y*100 + Z)
|
||||
local PFUI_CLASSIC_API_LATEST = 99999999
|
||||
local PFUI_CLASSIC_API_LATEST = PFUI_CLASSIC_API_MIN
|
||||
local PFUI_CLASSIC_API_WEBSITE = "https://github.com/brues-code/ClassicAPI"
|
||||
local PFUI_CLASSIC_API_LATEST_URL = PFUI_CLASSIC_API_WEBSITE .. "/releases/latest"
|
||||
local function FormatVersion(packed)
|
||||
|
||||
Reference in New Issue
Block a user