Class RetrieveLastVersion

java.lang.Object
fr.sandro642.github.update.RetrieveLastVersion

public class RetrieveLastVersion extends Object
RetrieveLastVersion is a class that retrieves the latest version of the software. It contains a field to store the latest version and can be extended to include methods for fetching
  • Constructor Details

    • RetrieveLastVersion

      public RetrieveLastVersion()
  • Method Details

    • fetchVersion

      public String fetchVersion()
      Fetches the latest version from the GitHub API. It sends a GET request to the tags endpoint of the ConnectLib repository and retrieves the name of the first tag, which represents the latest version.
    • isLatestVersion

      public void isLatestVersion()
      Compares the fetched version with the current version. If they are different, it prints a message indicating that a new version is available.