Added ability to specify a download repo version for a mod version

This commit is contained in:
Chr1Z93 2024-09-30 19:03:31 +02:00
parent befecca136
commit b358b27c8b

View File

@ -1928,6 +1928,15 @@ function compareVersion(request)
-- global variable to make it accessible for other functions
modMeta = JSON.decode(request.text)
-- maybe update SOURCE_REPO to specific version
if modMeta["setSpecificDownloadVersion"] then
local versionTable = modMeta["setSpecificDownloadVersion"][1]
if versionTable[MOD_VERSION] then
SOURCE_REPO = "https://github.com/Chr1Z93/SCED-downloads/releases/download/" .. versionTable[MOD_VERSION] .. "/"
log("Using download repo version: " .. versionTable[MOD_VERSION])
end
end
-- stop here if on latest or newer version
if convertVersionToNumber(MOD_VERSION) >= convertVersionToNumber(modMeta["latestVersion"]) then return end