-
- All Implemented Interfaces:
public class UpdateHandler
Handler for easy updating of the jar file from a GitHub repo.
-
-
Method Summary
Modifier and Type Method Description static String
getNewestVersion(String ghRepo)
Get the newest release version of an GitHub repo. static void
installUpdate(String ghRepo, String assetName, Class<out Object> mainClass)
Replace the .jar from your main class with a new one from GitHub. -
-
Method Detail
-
getNewestVersion
static String getNewestVersion(String ghRepo)
Get the newest release version of an GitHub repo.
- Parameters:
ghRepo
- The repo path.
-
installUpdate
static void installUpdate(String ghRepo, String assetName, Class<out Object> mainClass)
Replace the .jar from your main class with a new one from GitHub.
- Parameters:
ghRepo
- The repo path.assetName
- The asset name which should be downloaded from GitHub.mainClass
- The main class of your application to get the correct path to the .jar file.
-
-
-
-