1.1.7
All checks were successful
ModUpdater/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-06-29 12:33:55 -04:00
parent fedd2fe2d8
commit 74c97537b6
3 changed files with 8 additions and 16 deletions

View File

@ -1,5 +1,8 @@
# Changelog
**1.1.7**
* Disable SemVer In JSON Strategy
**1.1.6**
* Drop Dom4j Dependency

View File

@ -9,7 +9,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.8.8+build.202
# Mod Properties
mod_version = 1.1.6
mod_version = 1.1.7
maven_group = com.thebrokenrail
# Dependencies

View File

@ -9,8 +9,6 @@ import com.thebrokenrail.modupdater.api.ConfigObject;
import com.thebrokenrail.modupdater.api.UpdateStrategy;
import com.thebrokenrail.modupdater.data.ModUpdate;
import com.thebrokenrail.modupdater.util.Util;
import net.fabricmc.loader.api.SemanticVersion;
import net.fabricmc.loader.util.version.VersionParsingException;
import javax.annotation.Nullable;
import java.io.IOException;
@ -66,19 +64,10 @@ public class JSONStrategy implements UpdateStrategy {
String version = Util.getMinecraftVersion().getName();
if (map.containsKey(version)) {
LatestVersionEntry entry = map.get(version);
ModUpdate update = new ModUpdate(oldVersion, entry.version, entry.downloadUrl, name);
try {
if (SemanticVersion.parse(entry.version).compareTo(SemanticVersion.parse(oldVersion)) > 0) {
return update;
} else {
return null;
}
} catch (VersionParsingException e) {
if (!oldVersion.equals(entry.version)) {
return update;
} else {
return null;
}
if (!oldVersion.equals(entry.version)) {
return new ModUpdate(oldVersion, entry.version, entry.downloadUrl, name);
} else {
return null;
}
} else {
return null;