From 63f9b26d91b2190481cba28cd35b0e4c7a950c77 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 22 Jun 2026 19:47:57 -0500 Subject: [PATCH] classicapi: default LATEST to MIN so source builds never soft-nudge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/release.yml | 2 +- pfUI.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b2d6e1a..5b9c052c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/pfUI.lua b/pfUI.lua index fa1a6da2..22f9e743 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -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)