Allow rs.version to be a double
This allows sub-versions of the same RS revision
This commit is contained in:
@@ -39,7 +39,6 @@ import net.runelite.cache.fs.Archive;
|
||||
import net.runelite.cache.fs.Store;
|
||||
import net.runelite.cache.updater.beans.CacheEntry;
|
||||
import net.runelite.cache.updater.beans.IndexEntry;
|
||||
import net.runelite.http.api.RuneLiteAPI;
|
||||
import net.runelite.protocol.api.login.HandshakeResponseType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -63,6 +62,9 @@ public class CacheUpdater implements CommandLineRunner
|
||||
@Value("${minio.bucket}")
|
||||
private String minioBucket;
|
||||
|
||||
@Value("${rs.version}")
|
||||
private int rsVersion;
|
||||
|
||||
@Autowired
|
||||
public CacheUpdater(
|
||||
@Qualifier("Runelite Cache SQL2O") Sql2o sql2o,
|
||||
@@ -75,8 +77,6 @@ public class CacheUpdater implements CommandLineRunner
|
||||
|
||||
public void update() throws IOException, InvalidEndpointException, InvalidPortException, InterruptedException
|
||||
{
|
||||
int rsVersion = RuneLiteAPI.getRsVersion();
|
||||
|
||||
try (Connection con = sql2o.beginTransaction())
|
||||
{
|
||||
CacheDAO cacheDao = new CacheDAO();
|
||||
|
||||
@@ -40,7 +40,7 @@ public class CacheProperties
|
||||
|
||||
public static int getRsVersion() throws IOException
|
||||
{
|
||||
return Integer.parseInt(getProperties().getProperty("rs.version"));
|
||||
return (int) Double.parseDouble(getProperties().getProperty("rs.version"));
|
||||
}
|
||||
|
||||
public static int getCacheVersion() throws IOException
|
||||
|
||||
@@ -61,7 +61,6 @@ public class RuneLiteAPI
|
||||
private static final String STATICBASE = "https://static.runelite.net";
|
||||
private static final Properties properties = new Properties();
|
||||
private static String version;
|
||||
private static int rsVersion;
|
||||
|
||||
static
|
||||
{
|
||||
@@ -71,7 +70,6 @@ public class RuneLiteAPI
|
||||
properties.load(in);
|
||||
|
||||
version = properties.getProperty("runelite.version");
|
||||
rsVersion = Integer.parseInt(properties.getProperty("rs.version"));
|
||||
String commit = properties.getProperty("runelite.commit");
|
||||
boolean dirty = Boolean.parseBoolean(properties.getProperty("runelite.dirty"));
|
||||
|
||||
@@ -179,9 +177,4 @@ public class RuneLiteAPI
|
||||
RuneLiteAPI.version = version;
|
||||
}
|
||||
|
||||
public static int getRsVersion()
|
||||
{
|
||||
return rsVersion;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
runelite.version=${project.version}
|
||||
rs.version=${rs.version}
|
||||
runelite.commit=${git.commit.id.abbrev}
|
||||
runelite.dirty=${git.dirty}
|
||||
Reference in New Issue
Block a user