Skip to content

Commit

Permalink
style: 新增最新版本语句
Browse files Browse the repository at this point in the history
  • Loading branch information
0XPYEX0 committed Aug 31, 2024
1 parent 9508575 commit c575f97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = 'me.xpyex'
version = '1.0.11'
version = '1.0.12'
def pluginPackage = 'me.xpyex.plugin.CnUsername'.toLowerCase()
def modulePackage = 'me.xpyex.module.CnUsername'.toLowerCase()

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/me/xpyex/module/cnusername/UpdateChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class UpdateChecker {
}

public static void check() {
Logging.info("开始检查更新信息,当前版本: " + version);
try {
String api = "https://api.github.com/repos/0XPYEX0/CnUsername/releases/latest";
URLConnection connection = new URL(api).openConnection();
Expand All @@ -34,6 +35,8 @@ public static void check() {
Logging.info("发现新版本: " + tagName);
Logging.info("更新内容: " + body);
Logging.info("下载地址(Github): https://github.com/0XPYEX0/CnUsername/releases");
} else {
Logging.info("当前版本为最新版本");
}
} catch (Throwable e) {
e.printStackTrace();
Expand Down

0 comments on commit c575f97

Please sign in to comment.