mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
updatenotify: isolate fork from upstream pfUI traffic + handle dev builds
Switches the addon-message prefix to "pfUI-brues" so we don't share an
inbound queue with upstream pfUI installs at all — they don't register
a listener for this prefix, so our broadcasts get dropped at the engine
level instead of needing branch-string filtering on their end. The
"main" branch tag stays as a tiebreaker for any future fork variant
sharing this prefix.
Source/dev installs leave the toc Version as "@project-version@" until
release tooling substitutes it. pfUI.lua now stamps those as "dev" with
major/minor/fix=0 instead of silently falling back to 1.2.0, and
updatenotify short-circuits on pfUI.version.string == "dev" before
broadcasting so dev installs don't ship a stale low version to everyone
in guild/raid. Single source of truth — the dev marker lives in pfUI.lua.
URLs centralize via the toc's X-Website. updatenotify and firstrun read
it via GetAddOnMetadata + string.format("%s"), and all eight translation
files swap their hardcoded shagu.org references for the same %s slot.
Drive-bys: groupsize math uses ClassicAPI's IsInRaid/IsInGroup; toc
Author typo "modfied" → "modified".
This commit is contained in:
@@ -394,12 +394,20 @@ pfUI:SetScript("OnEvent", function()
|
||||
end
|
||||
|
||||
if arg1 == pfUI.name then
|
||||
-- read pfUI version from .toc file
|
||||
local major, minor, fix = pfUI.api.strsplit(".", tostring(GetAddOnMetadata(pfUI.name, "Version")))
|
||||
pfUI.version.major = tonumber(major) or 1
|
||||
pfUI.version.minor = tonumber(minor) or 2
|
||||
pfUI.version.fix = tonumber(fix) or 0
|
||||
pfUI.version.string = pfUI.version.major .. "." .. pfUI.version.minor .. "." .. pfUI.version.fix
|
||||
-- read pfUI version from .toc file. Source/dev installs leave Version as
|
||||
-- "@project-version@" until release tooling substitutes it — mark those
|
||||
-- explicitly as "dev" instead of pretending they're a real numbered build.
|
||||
local raw = tostring(GetAddOnMetadata(pfUI.name, "Version"))
|
||||
if strfind(raw, "@") then
|
||||
pfUI.version.major, pfUI.version.minor, pfUI.version.fix = 0, 0, 0
|
||||
pfUI.version.string = "dev"
|
||||
else
|
||||
local major, minor, fix = pfUI.api.strsplit(".", raw)
|
||||
pfUI.version.major = tonumber(major) or 0
|
||||
pfUI.version.minor = tonumber(minor) or 0
|
||||
pfUI.version.fix = tonumber(fix) or 0
|
||||
pfUI.version.string = pfUI.version.major .. "." .. pfUI.version.minor .. "." .. pfUI.version.fix
|
||||
end
|
||||
|
||||
-- use "Modern" as default profile on a fresh install
|
||||
if pfUI.api.isempty(pfUI_init) and pfUI.api.isempty(pfUI_config) then
|
||||
|
||||
Reference in New Issue
Block a user