Skip to content

Commit

Permalink
Set the version to "dev build" when null or empty
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafHacker committed Aug 16, 2020
1 parent a844134 commit 9f49b60
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
package io.github.ImpactDevelopment.installer;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.Strings;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.github.ImpactDevelopment.installer.gui.AppIcon;
Expand Down Expand Up @@ -138,7 +139,11 @@ private static String getFilename() {
}

public static String getVersion() {
return args.getClass().getPackage().getImplementationVersion();
String version = args.getClass().getPackage().getImplementationVersion();
if (Strings.isStringEmpty(version)) {
return "dev build";
}
return version;
}

public static String getTitle() {
Expand Down

0 comments on commit 9f49b60

Please sign in to comment.