Search in sources :

Example 1 with ReleaseReport

use of de.rwth.idsg.steve.web.dto.ReleaseReport in project steve by RWTH-i5-IDSG.

the class GithubReleaseCheckService method getReport.

// -------------------------------------------------------------------------
// Private helpers
// -------------------------------------------------------------------------
private static ReleaseReport getReport(ReleaseResponse response) {
    String githubVersion = extractVersion(response);
    Version build = Version.valueOf(SteveConfiguration.CONFIG.getSteveVersion());
    Version github = Version.valueOf(githubVersion);
    boolean isGithubMoreRecent = github.greaterThan(build);
    String downloadUrl = decideDownloadUrl(response);
    ReleaseReport ur = new ReleaseReport(isGithubMoreRecent);
    ur.setGithubVersion(githubVersion);
    ur.setDownloadUrl(downloadUrl);
    ur.setHtmlUrl(response.getHtmlUrl());
    return ur;
}
Also used : ReleaseReport(de.rwth.idsg.steve.web.dto.ReleaseReport) Version(com.github.zafarkhaja.semver.Version)

Aggregations

Version (com.github.zafarkhaja.semver.Version)1 ReleaseReport (de.rwth.idsg.steve.web.dto.ReleaseReport)1