1
mirror of https://github.com/CarmJos/GithubReleases4J.git synced 2026-06-04 21:18:16 +08:00

[v1.3.0] [A] Add the method to fetch how many versions behind

This commit is contained in:
2022-01-22 15:16:34 +08:00
parent c53ca18e96
commit 8445ac812d
3 changed files with 80 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
import cc.carm.lib.githubreleases4j.GithubReleases4J;
import org.junit.Test;
public class GithubVersionTest {
@Test
public void test() {
System.out.println(GithubReleases4J.getVersionBehind("CarmJos", "UltraDepository", "1.3.4"));
System.out.println(GithubReleases4J.getVersionBehind("CarmJos", "UltraDepository", "v1.2.0"));
System.out.println(GithubReleases4J.getVersionBehind("CarmJos", "UltraDepository", "TEST"));
System.out.println(GithubReleases4J.getVersionBehind("CarmJos", "NULL", "TEST"));
System.out.println("Download at " + GithubReleases4J.getReleaseURLByTag("CarmJos", "UltraDepository", "1.3.4"));
System.out.println("Download at " + GithubReleases4J.getLatestReleaseURL("CarmJos", "UltraDepository"));
}
}