Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used better version comparison lib #8

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'InventivetalentDev/master'
  • Loading branch information
BrainStone committed Feb 25, 2019
commit c533003dfe40a42f58d6da2f7928835c9f202eb6
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ before_deploy:
- export BUNGEE_RELASE_FILE=$(find . -name bungee-*.jar)
deploy:
provider: releases
api_key:
secure: "UWtRa2e6zn0A211KhsMR1zBve3+JN3UykcUXkB9ZFz9zREZUKgBqfxwKGpSCIbGZO5lEhMExAi5Ek7R3XTYLB5HSq+HodFQvYjQoinxF/MzKwDP2biXevp36hmICl+WPGdh0fovw4dDcJ2JFN3CQHYNgnabbelWkReda3hHuKqWWxG3mBR9mCG2y4NyneYtum82kq10os/AJNmDgmtDE+yYDdoP0o0yr8RtKmtArkBCxjD0PZlZcB5arAv3NCtmZ+eZM9m3DR7WOXrJv08JJmwV3KlBE7P8qGDfCh5I/AjlJZPR3epR8zWkTvu/D9jjQiWkNpTvRsTrkzb1+xeMdotmOV/d1YTpjNAg47nhkIOx/DXfK+pCEQcQEmPNWdm8TCix+BhULkGxDkH2dZjrsP8xBecHQlhYqRDaH16VUxvSKqatLelsg02uK8IrYvty1VJSUp7BxypPUkDjz1ae7w+MXZwX33Dyzq2SlH6Yz6WZ5TADxKsy/n4w5g6LbRlCnlH0fQQIXOy58XJYrlyguFLF1yxgca8Q17PvmfF8h2x4CXi9RTpcYPKduvGlPF3rqlK9kI0tgKHToRTRVvEtvL2fJLTyiGmB/QMEQ1abNon/osiah3QxbD96k44V7YU9njYUuHkpd2pj6afPFqI1uklBuApe7IMCB8Gc8LJ/iDhA="
api_key:
secure: "eic3KobDkmWVoKQI9KjWgjrhw2aK6xJOnpUP7eKY2C7x5ZGvwZmZZ8PmgT2M07WFuklq/rn87fOJs7FvkpG1jkpF4aGO90wi1zy4LxVKLd4sHSwp1mHBbNAejL3ph+ff7tIKkyTENFKOX5YusXOM7ZRc162ySH4+UpkKLQwtItQ8qKkwcOzI4B9tiiLrq6vAO163/AiIo3lZCFNoeOc5kHnHVoDFRthhcSuFgi+gDk7au4ndA64/mrABuhtfQKJz32/GjybV+8Ah+ZYcGcGm9TuVi2itJ2UiTgnrVkJKWlJNgkuvtgZx6J5lZvHk1gjoiXJl3kojbHgV9rXqrTsKxN+NQPFwaak/S0c6iqRCqu3AzlKL0Xmh3aqA403cxpKI20PiXi5bXUOTBmIwANU/jHyIP9VRZJRpi2/dGLM5p2wPGO9CmsdOlthcreIYvnHXqlL3I/vnyjfxv0eJuRsfJ/hrC2NdI95UjF+AxaCtPsOWbKtdS9STtA0HpQzyCOCNT8Nu2dg/u1Wss6qe0XfzaShG54vBwM9b/bcSi9wh+8ivpEOKEF3RWfZ1dYaiEbeJ/Eu9UYWeVIeFvboUkETz4ZCyB8hoxdJwZ3VJbD5nQbZFqbOlfCa4jmBwGKkOYe/+FBr/iMDhlRwjjmqDC8OCC6k4jT4VDAIeE6ey5YsbLk8="
file_glob: true
file:
- "Bukkit/target/bukkit-*.jar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class ResourceInfo {

public int id;
public boolean external;
public boolean premium;
public ResourceFile file;

public ResourceVersion latestVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

public abstract class SpigetUpdateAbstract {

public static final String RESOURCE_INFO = "http://api.spiget.org/v2/resources/%s?ut=%s";
public static final String RESOURCE_VERSION = "http://api.spiget.org/v2/resources/%s/versions/latest?ut=%s";
public static final String RESOURCE_INFO = "https://api.spiget.org/v2/resources/%s?ut=%s";
public static final String RESOURCE_VERSION = "https://api.spiget.org/v2/resources/%s/versions/latest?ut=%s";

protected final int resourceId;
protected final String currentVersion;
Expand Down Expand Up @@ -93,7 +93,7 @@ public void run() {
latestResourceInfo.latestVersion = new Gson().fromJson(jsonObject, ResourceVersion.class);

if (isVersionNewer(currentVersion, latestResourceInfo.latestVersion.name)) {
callback.updateAvailable(latestResourceInfo.latestVersion.name, "https://spigotmc.org/" + latestResourceInfo.file.url, !latestResourceInfo.external);
callback.updateAvailable(latestResourceInfo.latestVersion.name, "https://spigotmc.org/" + latestResourceInfo.file.url, !latestResourceInfo.external&&!latestResourceInfo.premium);
} else {
callback.upToDate();
}
Expand Down
12 changes: 4 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</modules>

<properties>
<s-update.version>1.4.0</s-update.version>
<s-update.version>1.4.2-SNAPSHOT</s-update.version>
</properties>

<build>
Expand Down Expand Up @@ -82,7 +82,7 @@
<repositories>
<repository>
<id>inventive-repo</id>
<url>http://repo.inventivetalent.org/content/groups/public/</url>
<url>https://repo.inventivetalent.org/content/groups/public/</url>
</repository>
<repository>
<id>md_5-repo</id>
Expand All @@ -96,10 +96,6 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>mcstats-repo</id>
<url>http://repo.mcstats.org/content/groups/public/</url>
</repository>
<repository>
<id>AuraDevelopmentTeam</id>
<url>https://maven.project-creative.de/repository/auradev-releases/</url>
Expand All @@ -109,11 +105,11 @@
<distributionManagement>
<repository>
<id>sonatype-nexus-releases</id>
<url>http://repo.inventivetalent.org/content/repositories/releases/</url>
<url>https://repo.inventivetalent.org/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<url>http://repo.inventivetalent.org/content/repositories/snapshots/</url>
<url>https://repo.inventivetalent.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.