:3
This commit is contained in:
parent
1c6af0a1f9
commit
d99a1ee5bb
8
rtmc.lua
8
rtmc.lua
|
@ -347,7 +347,7 @@ rawset(__BUNDLER_FILES, "updater", function ()
|
||||||
c.api_url = "https://git.mcorangehq.xyz/api/v1/repos/xomf/keypadOS";
|
c.api_url = "https://git.mcorangehq.xyz/api/v1/repos/xomf/keypadOS";
|
||||||
c.curr_commit_hash = "";
|
c.curr_commit_hash = "";
|
||||||
c.updated_files = {};
|
c.updated_files = {};
|
||||||
c:addEntry("startup", "main", "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/rtmc.lua");
|
c:addEntry("startup.lua", "main", "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/rtmc.lua");
|
||||||
return c
|
return c
|
||||||
end
|
end
|
||||||
function updater:addEntry(path, branch, url)
|
function updater:addEntry(path, branch, url)
|
||||||
|
@ -392,14 +392,14 @@ rawset(__BUNDLER_FILES, "updater", function ()
|
||||||
local data = json.decode(body);
|
local data = json.decode(body);
|
||||||
if self.curr_commit_hash == "" then
|
if self.curr_commit_hash == "" then
|
||||||
log.debug("No commit hash found, setting");
|
log.debug("No commit hash found, setting");
|
||||||
self.curr_commit_hash = data[1].hash;
|
self.curr_commit_hash = data[1].sha;
|
||||||
elseif data[1].hash ~= self.curr_commit_hash then
|
elseif data[1].sha ~= self.curr_commit_hash then
|
||||||
log.debug("Commit hash doesnt match, probbably an update");
|
log.debug("Commit hash doesnt match, probbably an update");
|
||||||
return true;
|
return true;
|
||||||
end
|
end
|
||||||
if data[1].hash == self.curr_commit_hash then
|
if data[1].hash == self.curr_commit_hash then
|
||||||
log.debug("Commit hash matches");
|
log.debug("Commit hash matches");
|
||||||
log.debug(data[1].hash .. " (old) => (new) " .. self.curr_commit_hash);
|
log.debug(data[1].sha .. " (old) => (new) " .. self.curr_commit_hash);
|
||||||
end
|
end
|
||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ function updater.new()
|
||||||
c.api_url = "https://git.mcorangehq.xyz/api/v1/repos/xomf/keypadOS";
|
c.api_url = "https://git.mcorangehq.xyz/api/v1/repos/xomf/keypadOS";
|
||||||
c.curr_commit_hash = "";
|
c.curr_commit_hash = "";
|
||||||
c.updated_files = {};
|
c.updated_files = {};
|
||||||
c:addEntry("startup", "main", "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/rtmc.lua");
|
c:addEntry("startup.lua", "main", "https://git.mcorangehq.xyz/xomf/keypadOS/raw/branch/main/rtmc.lua");
|
||||||
return c
|
return c
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -74,15 +74,15 @@ function updater:check(branch)
|
||||||
local data = json.decode(body);
|
local data = json.decode(body);
|
||||||
if self.curr_commit_hash == "" then
|
if self.curr_commit_hash == "" then
|
||||||
log.debug("No commit hash found, setting");
|
log.debug("No commit hash found, setting");
|
||||||
self.curr_commit_hash = data[1].hash;
|
self.curr_commit_hash = data[1].sha;
|
||||||
elseif data[1].hash ~= self.curr_commit_hash then
|
elseif data[1].sha ~= self.curr_commit_hash then
|
||||||
log.debug("Commit hash doesnt match, probbably an update");
|
log.debug("Commit hash doesnt match, probbably an update");
|
||||||
return true;
|
return true;
|
||||||
end
|
end
|
||||||
|
|
||||||
if data[1].hash == self.curr_commit_hash then
|
if data[1].hash == self.curr_commit_hash then
|
||||||
log.debug("Commit hash matches");
|
log.debug("Commit hash matches");
|
||||||
log.debug(data[1].hash .. " (old) => (new) " .. self.curr_commit_hash);
|
log.debug(data[1].sha .. " (old) => (new) " .. self.curr_commit_hash);
|
||||||
end
|
end
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user