Merge pull request #888 from argonui/force-download-version

Added ability to specify a download repo version for a mod version
This commit is contained in:
dscarpac 2024-09-30 18:10:41 -05:00 committed by GitHub
commit 7cb143bfda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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