MCPcopy Create free account
hub / github.com/OreosLab/bili / printVersionInfo

Method printVersionInfo

src/main/java/top/misec/utils/VersionInfo.java:30–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 public static void printVersionInfo() {
31 initInfo();
32 JsonObject jsonObject = HttpUtils.doGet("https://api.github.com/repos/Oreomeow/bili/releases/latest");
33 log.info("-----版本信息-----");
34 log.info("当前版本: {}", releaseVersion);
35 try {
36 log.info("最新版本为: {}", jsonObject.get("tag_name").getAsString().replaceAll("v", ""));
37 log.info("-----最新版本更新内容-----\n{}", jsonObject.get("body").getAsString().replaceAll("\"", ""));
38 log.info("最近更新时间: {}", HelpUtil.utcTime(jsonObject.get("created_at").getAsString()));
39 log.info("项目备份地址: {}", projectRepo);
40 log.info("-----版本信息-----\n");
41 } catch (Exception e) {
42 log.warn("网络问题,未请求到新版本", e);
43 }
44
45 }
46}

Callers 4

testMainHandlerMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainHandlerMethod · 0.95

Calls 3

initInfoMethod · 0.95
doGetMethod · 0.95
utcTimeMethod · 0.95

Tested by 2

testMainHandlerMethod · 0.76
mainMethod · 0.76