1 Commits

Author SHA1 Message Date
Brues 63f9b26d91 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.
2026-06-22 19:47:57 -05:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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)