Skip to content

Commit

Permalink
some backend changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Repooc committed Sep 24, 2024
1 parent 7b1fe6f commit deab9f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ElvUI_DynamicStatusIcons/ElvUI_DynamicStatusIcons.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 14 additions & 1 deletion ElvUI_DynamicStatusIcons/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit deab9f4

Please sign in to comment.