Class Update

java.lang.Object
ch.autumo.beetroot.utils.system.Update

public class Update extends Object
Update Check.
  • Constructor Details

    • Update

      public Update()
      Default constructor.
  • Method Details

    • getLatestRelease

      public static String getLatestRelease() throws Exception
      Fetches the latest release version from the GitHub repository.
      Returns:
      the latest release version as a string
      Throws:
      Exception - if an error occurs during the request
    • isNewerVersion2

      public static boolean isNewerVersion2(String latestRelease, String currentReleaseVersion)
      Checks if the latest version is newer than the current version.
      Parameters:
      latestRelease - the latest release version (e.g., "1.2.0")
      currentReleaseVersion - the current release version (e.g., "1.0.0")
      Returns:
      true if latestRelease is newer, false otherwise
    • isNewerVersion

      public static int isNewerVersion(String latestRelease, String currentReleaseVersion)
      Check current beetRoot version.
      Parameters:
      latestRelease - latest release version
      currentReleaseVersion - current release version
      Returns:
      true if latest release version is higher than current release version
    • main

      public static void main(String[] args)
      Runs the update tool from the command line.
      Parameters:
      args - the command-line arguments