: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.curr_commit_hash = "";
 | 
			
		||||
        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
 | 
			
		||||
    end
 | 
			
		||||
    function updater:addEntry(path, branch, url)
 | 
			
		||||
| 
						 | 
				
			
			@ -392,14 +392,14 @@ rawset(__BUNDLER_FILES, "updater", function ()
 | 
			
		|||
        local data = json.decode(body);
 | 
			
		||||
        if self.curr_commit_hash == "" then
 | 
			
		||||
            log.debug("No commit hash found, setting");
 | 
			
		||||
            self.curr_commit_hash = data[1].hash;
 | 
			
		||||
        elseif data[1].hash ~= self.curr_commit_hash then
 | 
			
		||||
            self.curr_commit_hash = data[1].sha;
 | 
			
		||||
        elseif data[1].sha ~= self.curr_commit_hash then
 | 
			
		||||
            log.debug("Commit hash doesnt match, probbably an update");
 | 
			
		||||
            return true;
 | 
			
		||||
        end
 | 
			
		||||
        if data[1].hash == self.curr_commit_hash then
 | 
			
		||||
            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
 | 
			
		||||
        return false;
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ function updater.new()
 | 
			
		|||
    c.api_url = "https://git.mcorangehq.xyz/api/v1/repos/xomf/keypadOS";
 | 
			
		||||
    c.curr_commit_hash = "";
 | 
			
		||||
    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
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -74,15 +74,15 @@ function updater:check(branch)
 | 
			
		|||
    local data = json.decode(body);
 | 
			
		||||
    if self.curr_commit_hash == "" then
 | 
			
		||||
        log.debug("No commit hash found, setting");
 | 
			
		||||
        self.curr_commit_hash = data[1].hash;
 | 
			
		||||
    elseif data[1].hash ~= self.curr_commit_hash then
 | 
			
		||||
        self.curr_commit_hash = data[1].sha;
 | 
			
		||||
    elseif data[1].sha ~= self.curr_commit_hash then
 | 
			
		||||
        log.debug("Commit hash doesnt match, probbably an update");
 | 
			
		||||
        return true;
 | 
			
		||||
    end
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    if data[1].hash == self.curr_commit_hash then
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user