Skip to content

Commit

Permalink
FIXED: Validating old meta files failed after source changed
Browse files Browse the repository at this point in the history
CHANGED: Disabled outlet version lookup for now
  • Loading branch information
WinPlay02 committed Aug 25, 2023
1 parent 24caa99 commit c286f52
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/groovy/com/github/winplay02/RemoteHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static boolean checksumCheckFileIsValidAndExists(File targetFile, String
if (GitCraft.config.checksumRemoveInvalidFiles) {
MiscHelper.println("Checksum of %s %s %s is %s, expected %s. The mismatching file will now be removed (checksums mismatch)", fileVerbParticiple, outputFileKind, outputFileId, actualSha1, sha1sum);
targetFile.delete();
cached_hashes.remove(targetFile);
return false;
} else {
MiscHelper.println("Checksum of %s %s %s is %s, expected %s. (checksums mismatch)", fileVerbParticiple, outputFileKind, outputFileId, actualSha1, sha1sum);
Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/dex/mcgitmaker/GitCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class GitCraft {

GitCraft() throws IOException, VersionParsingException {
this.mcMetadata = new McMetadata();
MiscHelper.println("If generated semver is incorrect, it will break the order of the generated repo.\nConsider updating Fabric Loader. (run ./gradlew run --refresh-dependencies)");
versions = Util.orderVersionMap(mcMetadata.metadata);
nonLinearVersions = Util.nonLinearVersionList(mcMetadata.metadata);
MiscHelper.println("Saving updated metadata...");
Expand Down
3 changes: 1 addition & 2 deletions src/main/groovy/dex/mcgitmaker/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static String fixupSemver(String proposedSemVer) {
public static void addLoaderVersion(McVersion mcVersion) {
if (mcVersion.loaderVersion == null) {
// Attempt lookup in Outlet database as newer MC versions require a loader update
Optional<McFabric> v = Outlet.INSTANCE.outletDatabase.getVersions().stream().filter((it) -> Objects.equals(it.getId(), mcVersion.version)).findAny();
Optional<McFabric> v = Outlet.INSTANCE.outletDatabase.getVersion(mcVersion);
if (v.isPresent()) {
mcVersion.loaderVersion = fixupSemver(v.get().getNormalized());
MiscHelper.println("Successfully looked up new semver version for: %s as %s", mcVersion.version, mcVersion.loaderVersion);
Expand All @@ -77,7 +77,6 @@ public static void addLoaderVersion(McVersion mcVersion) {
}
mcVersion.loaderVersion = fixupSemver(x.getNormalized());
MiscHelper.println("Semver made for: %s as %s", x.getRaw(), mcVersion.loaderVersion);
MiscHelper.println("If generated semver is incorrect, it will break the order of the generated repo.\nConsider updating Fabric Loader. (run ./gradlew run --refresh-dependencies)");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package dex.mcgitmaker.data.outlet

import dex.mcgitmaker.data.McVersion
import groovy.transform.ToString

@ToString
class McOutletMeta {
Date lastChanged
ArrayList<McFabric> versions

Optional<McFabric> getVersion(McVersion version) {
return Optional.empty();
}
}

0 comments on commit c286f52

Please sign in to comment.