1) Updated plugin version code to use a major.minor format instead of a major.minor.build format

2) Version table pulls version information directly out of the plugin's version field now
master
Durel 7 years ago
parent 6c9ae56469
commit 9b3230cef3

@ -83,7 +83,7 @@ dbot.callback : Module to help manage callback functions and parameters
save_state="y"
date_written="2017-08-12 08:45:15"
requires="4.98"
version="1.3"
version="1.4"
>
<description trim="y">
<![CDATA[
@ -1179,7 +1179,11 @@ end -- inv.reload
----------------------------------------------------------------------------------------------------
inv.version = {}
inv.version.table = { pluginVer = { major = 0, minor = 1, build = 4 }, --FIXME: use plugin format info?
_, _, inv.version.pluginMajor, inv.version.pluginMinor =
string.find(tostring(GetPluginInfo(GetPluginID(), 19)), "(%d+).(%d+)")
inv.version.table = { pluginVer = { major = inv.version.pluginMajor, minor = inv.version.pluginMinor },
tableFormat = { major = 0, minor = 1 },
cacheFormat = { major = 0, minor = 1 },
consumeFormat = { major = 0, minor = 1 },
@ -1196,11 +1200,10 @@ end -- inv.version.get
function inv.version.display()
dbot.print("\n @y" .. pluginNameAbbr .. " Aardwolf Plugin\n" ..
"------------------------@w")
"-----------------------@w")
dbot.print("@WPlugin Version: @G" ..
inv.version.table.pluginVer.major .. "." ..
inv.version.table.pluginVer.minor .. "." ..
inv.version.table.pluginVer.build .. "@w")
inv.version.table.pluginVer.minor .. "@w")
dbot.print("")
dbot.print("@WInv. Table Format: @G" ..
inv.version.table.tableFormat.major .. "." ..
@ -10347,7 +10350,8 @@ function inv.priority.load()
inv.priority.reset)
if (retval ~= DRL_RET_SUCCESS) then
dbot.warn("inv.priority.load: Failed to load table from file \"@R" ..
dbot.backup.getCurrentDir() .. inv.priority.stateName .. "@W\": " .. dbot.retval.getString(retval))
dbot.backup.getCurrentDir() .. inv.priority.stateName .. "@W\": " ..
dbot.retval.getString(retval))
end -- if
-- Check if the priority table version we loaded is compatible with the current code
@ -16061,7 +16065,7 @@ function dbot.updateRaw(retval, page, status, headers, fullStatus, requestUrl)
local remoteVersion = tonumber(string.match(page, '%s%s+version="([0-9%.]+)"')) or 0
if (remoteVersion == currentVersion) then
dbot.info("Your plugin is up-to-date at version \"" .. currentVersion .. "\"")
dbot.info("Your plugin is up-to-date at version " .. currentVersion)
elseif (remoteVersion < currentVersion) then
dbot.warn("Your current plugin (v" .. currentVersion .. ") is reporting that it " ..

Loading…
Cancel
Save