mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-18 18:18:34 +00:00
refactor(init): export cache and update intervals
BREAKING CHANGE: lib will store cached export functions and no longer uses the : syntax to call functions. Allow SetInterval to return arguments to the callback function.
This commit is contained in:
1 parent
6b3af6f0d9
commit
d0c5f722db
4 files changed
+65
-45
No files matched your search
+2
-3
@@ -5,10 +5,9 @@ CreateThread(function()
|
||||
local version = GetResourceMetadata(resource, 'version', 0)
|
||||
|
||||
PerformHttpRequest(('%s/master/fxmanifest.lua'):format(url:gsub('github.com', 'raw.githubusercontent.com')), function(error, response)
|
||||
if error ~= 200 then
|
||||
if error == 200 then
|
||||
local latest = response:match('%d%.%d+%.%d+')
|
||||
print(version, latest)
|
||||
if version == latest then
|
||||
if version < latest then
|
||||
local curMajor, curMinor = string.strsplit('.', version)
|
||||
local newMajor, newMinor = string.strsplit('.', response:match('%d%.%d+%.%d+'))
|
||||
local link = ('%s/archive/refs/tags/%s.zip'):format(url, latest, latest)
|
||||
|
||||
Reference in new issue
Block a user