Skip to content

Lezurex/github-version-checker

Repository files navigation

GitHub Version Checker

GitHub release (latest by date) GitHub all releases GitHub

A java library for checking for new releases on GitHub

Download

This library is published as com.lezurex.github-version-checker on GitHub Packages. Take a look at this to see how to configure the GitHub Package Registry for your project.

Usage

public class Example {

    public static void main(String[] args) {
        ReleaseVersion currentVersion = new ReleaseVersion("v1.0.0");
        GithubVersionChecker versionChecker = new GithubVersionChecker("Lezurex", "github-version-checker", currentVersion);

        CheckResult result = versionChecker.check();
        switch (result.getVersionState()) {
            case NEWER:
                System.out.println("You are on a development branch, aren't you?");
                break;
            case OUTDATED:
                System.out.printf("Your current version is outdated! %s is available here: %s", result.getVersion(), result.getPageLink());
                break;
            case UP_TO_DATE:
                System.out.println("Your current version is up to date!");
                break;
        }

    }

}

About

A java library for checking for new releases on Github

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages