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:
parent
120362f221
commit
778235e8d1
@ -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>
|
||||
|
@ -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());
|
||||
}
|
Loading…
Reference in New Issue
Block a user