Skip to content

Commit

Permalink
Show semver version instead of build
Browse files Browse the repository at this point in the history
  • Loading branch information
PBoki committed Nov 29, 2023
1 parent 270ac31 commit 282a711
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/tsp/headdb/HeadDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import tsp.headdb.core.storage.Storage;
import tsp.headdb.core.task.UpdateTask;
import tsp.headdb.core.util.HeadDBLogger;
import tsp.headdb.core.util.Utils;
import tsp.helperlite.HelperLite;
import tsp.helperlite.Schedulers;
import tsp.helperlite.scheduler.promise.Promise;
Expand Down Expand Up @@ -43,7 +44,7 @@ public void onStart(NexusPlugin nexusPlugin) {

instance.saveDefaultConfig();
instance.logger = new HeadDBLogger(getConfig().getBoolean("debug"));
instance.logger.info("Loading HeadDB - " + instance.getDescription().getVersion());
instance.logger.info("Loading HeadDB - " + Utils.getVersion().orElse(getDescription().getVersion() + " (UNKNOWN SEMVER)"));

instance.logger.info("Loaded " + loadLocalization() + " languages!");

Expand Down Expand Up @@ -97,7 +98,7 @@ private void ensureLatestVersion() {
connection.setConnectTimeout(5000);
connection.setRequestProperty("User-Agent", this.getName() + "-VersionChecker");

return new BufferedReader(new InputStreamReader(connection.getInputStream())).readLine().equals(this.getDescription().getVersion());
return new BufferedReader(new InputStreamReader(connection.getInputStream())).readLine().equals(Utils.getVersion().orElse(getDescription().getVersion()));
} catch (IOException ex) {
return false;
}
Expand Down

0 comments on commit 282a711

Please sign in to comment.