1
mirror of https://github.com/CarmJos/EasyPlugin.git synced 2024-09-19 19:25:45 +00:00

feat(updater): 添加Github更新检查模块,方便获取基于Github发布的插件版本更新。

This commit is contained in:
Carm Jos 2022-06-18 03:04:30 +08:00
parent 120362f221
commit 778235e8d1
4 changed files with 9 additions and 3 deletions

View File

@ -15,10 +15,10 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>
<artifactId>easyplugin-updatechecker</artifactId>
<artifactId>easyplugin-githubchecker</artifactId>
<packaging>jar</packaging>
<name>EasyPlugin-UpdateChecker</name>
<name>EasyPlugin-GithubChecker</name>
<dependencies>

View File

@ -21,6 +21,12 @@ public class GHUpdateChecker {
return new GHUpdateChecker(plugin.getLogger(), getGithubOwner(plugin), plugin.getName());
}
public static @NotNull Runnable runner(@NotNull Logger logger,
@NotNull String owner, @NotNull String repo,
@NotNull String currentVersion) {
return of(logger, owner, repo).runner(currentVersion);
}
public static @NotNull Runnable runner(@NotNull Plugin plugin) {
return of(plugin).runner(plugin.getDescription().getVersion());
}

View File

@ -29,7 +29,7 @@
<module>extension/papi</module>
<module>extension/vault</module>
<module>extension/updater</module>
<module>extension/gh-checker</module>
<module>collection/all</module>
<module>collection/bom</module>