Skip to content

Commit

Permalink
Remove support for Aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
maddie480 authored Apr 24, 2024
1 parent 72c6ac0 commit b7f910d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ Files and images are uploaded to [0x0ade's server](https://celestemodupdater.0x0
This file is generated at `uploads/moddependencygraph.yaml` and lists what each mod in `everestupdate.yaml` depends on:
```yaml
WitheredPassage:
Aliases: {}
OptionalDependencies: {}
Dependencies:
FrostHelper: 1.17.8
Expand Down Expand Up @@ -203,7 +202,7 @@ Get Maven, then run the following command at the project root:
mvn clean package
```

This will build the project to `target/update-checker-0.5.0.jar`.
This will build the project to `target/update-checker-0.6.0.jar`.

### Running the project

Expand All @@ -214,7 +213,7 @@ First, follow these steps to set it up:
Then, to run the project, browse to where the JAR is in a terminal / command prompt, then run

```
java -jar update-checker-0.5.0.jar [minutes]
java -jar update-checker-0.6.0.jar [minutes]
```
[minutes] is the wait delay in minutes between two GameBanana checks (defaults to 30). Be aware that the program makes ~13 API calls per check, and that the GameBanana API has a cap at 250 requests/hour.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ovh.maddie480.everest.updatechecker</groupId>
<artifactId>update-checker</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>

<properties>
<jdk.version>21</jdk.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ovh.maddie480.everest.updatechecker;
0.6.0package ovh.maddie480.everest.updatechecker;

import org.apache.commons.io.function.IOSupplier;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static void updateDependencyGraph() throws IOException {
// read its everest.yaml
Map<String, String> dependencies = new HashMap<>();
Map<String, String> optionalDependencies = new HashMap<>();
Map<String, String> aliases = new HashMap<>();
try (ZipFile zipFile = ZipFileWithAutoEncoding.open("mod-dependencytree.zip")) {
checkZipSignature(new File("mod-dependencytree.zip").toPath());

Expand All @@ -89,14 +88,11 @@ static void updateDependencyGraph() throws IOException {
if (yamlEntry.containsKey("OptionalDependencies")) {
addDependenciesFromList(optionalDependencies, (List<Map<String, Object>>) yamlEntry.get("OptionalDependencies"), everestYamlContents);
}
if (yamlEntry.containsKey("Aliases")) {
addDependenciesFromList(aliases, (List<Map<String, Object>>) yamlEntry.get("Aliases"), everestYamlContents);
}
}

log.info("Found {} dependencies, {} optional dependencies and {} aliases for for {}.",
dependencies.size(), optionalDependencies.size(), aliases.size(), mod.getKey());
EventListener.handle(listener -> listener.scannedModDependencies(mod.getKey(), dependencies.size(), optionalDependencies.size(), aliases.size()));
log.info("Found {} dependencies and {} optional dependencies for for {}.",
dependencies.size(), optionalDependencies.size(), mod.getKey());
EventListener.handle(listener -> listener.scannedModDependencies(mod.getKey(), dependencies.size(), optionalDependencies.size()));
} catch (Exception e) {
// if a file cannot be read as a zip, no need to worry about it.
// we will just write an empty array.
Expand All @@ -109,7 +105,6 @@ static void updateDependencyGraph() throws IOException {
graphEntry.put("URL", url);
graphEntry.put("Dependencies", dependencies);
graphEntry.put("OptionalDependencies", optionalDependencies);
graphEntry.put("Aliases", aliases);
newDependencyGraph.put(mod.getKey(), graphEntry);

FileUtils.forceDelete(new File("mod-dependencytree.zip"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void handle(Consumer<EventListener> functionCall) {

public abstract void scannedLoennEntities(String fileUrl, int entityCount, int triggerCount, int effectCount);

public abstract void scannedModDependencies(String modId, int dependencyCount, int optionalDependencyCount, int aliasCount);
public abstract void scannedModDependencies(String modId, int dependencyCount, int optionalDependencyCount);

public abstract void modUpdatedIncrementally(String gameBananaType, int gameBananaId, String modName);

Expand Down

0 comments on commit b7f910d

Please sign in to comment.