Skip to content

Commit

Permalink
[fix]在beta环境下,v -> beta
Browse files Browse the repository at this point in the history
  • Loading branch information
yajuhua committed Aug 8, 2024
1 parent d851662 commit 5d8e078
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/io/github/yajuhua/podcast2/update/ProjectUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ public static UpdateInfo getUpdateInfo(String currentVersion) throws Exception {
updateInfo.setVersion(currentVersion);
return updateInfo;
}
} else if (currentVersion.startsWith("v") && tagName.startsWith("beta")) {
if (beta != null && beta.equalsIgnoreCase("true")) {
updateInfo.setHasUpdate(true);
updateInfo.setDesc(html);
updateInfo.setVersion(tagName);
return updateInfo;
} else {
updateInfo.setHasUpdate(false);
updateInfo.setDesc("当前版本不支持在线更新至测试版");
updateInfo.setVersion(currentVersion);
return updateInfo;
}
} else if (currentVersion.startsWith("beta") && tagName.startsWith("beta")) {
if (beta != null && beta.equalsIgnoreCase("true") && !currentVersion.equals(tagName)) {
updateInfo.setHasUpdate(true);
Expand Down

0 comments on commit 5d8e078

Please sign in to comment.