diff --git a/ElvUI_DynamicStatusIcons/ElvUI_DynamicStatusIcons.toc b/ElvUI_DynamicStatusIcons/ElvUI_DynamicStatusIcons.toc index 0bedf4e..75a87cd 100644 --- a/ElvUI_DynamicStatusIcons/ElvUI_DynamicStatusIcons.toc +++ b/ElvUI_DynamicStatusIcons/ElvUI_DynamicStatusIcons.toc @@ -1,9 +1,8 @@ -## Interface: 110002 -## Interface-Cata: 40400 -## Interface-Classic: 11503 +## Interface: 110002, 40400, 11504 ## Title: |cff1784d1ElvUI|r |cff9482c9Dynamic Status Icons|r ## Author: Repooc, Releaf -## Version: 1.15 +## Version: @project-version@ +## X-PreviousVersion: 1.15 ## Notes: Plugin-edit for |cff1784d1ElvUI|r adding additional resting icons. ## RequiredDeps: ElvUI ## DefaultState: Enabled diff --git a/ElvUI_DynamicStatusIcons/Init.lua b/ElvUI_DynamicStatusIcons/Init.lua index becac32..cb82030 100644 --- a/ElvUI_DynamicStatusIcons/Init.lua +++ b/ElvUI_DynamicStatusIcons/Init.lua @@ -22,6 +22,19 @@ local function GetOptions() end end +function DSI:ParseVersionString() + local version = GetAddOnMetadata(AddOnName, 'Version') + local prevVersion = GetAddOnMetadata(AddOnName, 'X-PreviousVersion') + if strfind(version, 'project%-version') then + return prevVersion, prevVersion..'-git', nil, true + else + local release, extra = strmatch(version, '^v?([%d.]+)(.*)') + return tonumber(release), release..extra, extra ~= '' + end +end + +DSI.version, DSI.versionString, DSI.versionDev, DSI.versionGit = DSI:ParseVersionString() + local txframe = CreateFrame('Frame') local tx = txframe:CreateTexture() function DSI:TextureExists(path) @@ -49,7 +62,7 @@ function DSI:Initialize() DSI:ConstructElements() - EP:RegisterPlugin(AddOnName, GetOptions) + EP:RegisterPlugin(AddOnName, GetOptions, nil, DSI.versionString) LibStub('RepoocReforged-1.0'):LoadMainCategory() end