mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
refactor(lua): remove file check and move to subdirectory
This commit is contained in:
1 parent
2c90290c84
commit
9de50f684f
3 files changed
+1
-15
No files matched your search
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,4 @@
|
||||
local resource = GetCurrentResourceName()
|
||||
local oxmysql = exports[resource]
|
||||
|
||||
local oxmysql = exports.oxmysql
|
||||
|
||||
CreateThread(function()
|
||||
Wait(1000)
|
||||
@@ -8,18 +6,6 @@ CreateThread(function()
|
||||
local version = GetResourceMetadata(resource, 'version', 0)
|
||||
local link = ('%s/releases/download/v%s/oxmysql-v%s.zip'):format(url, version, version)
|
||||
|
||||
local path = GetResourcePath(resource):gsub('//', '/')
|
||||
path = ('%s/oxmysql.js'):format(path)
|
||||
local system = os.getenv('OS')
|
||||
if system and system:match('Windows') then
|
||||
path = path:gsub('/', '\\')
|
||||
end
|
||||
local file = io.open(path, 'r')
|
||||
|
||||
if file ~= nil then file:close() else
|
||||
error(('Unable to locate built "oxmysql.js" - please download the release!\n ^3- %s^0\n'):format(link))
|
||||
end
|
||||
|
||||
PerformHttpRequest(('%s/main/fxmanifest.lua'):format(url:gsub('github.com', 'raw.githubusercontent.com')), function(error, response)
|
||||
if error == 200 then
|
||||
local latest = response:match('%d%.%d+%.%d+')
|
||||
Reference in new issue
Block a user