Package fr.sandro642.github.update
Class RetrieveLastVersion
java.lang.Object
fr.sandro642.github.update.RetrieveLastVersion
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetches the latest version from the GitHub API.voidCompares the fetched version with the current version.
-
Constructor Details
-
RetrieveLastVersion
public RetrieveLastVersion()
-
-
Method Details
-
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.
-