Skip to content

Commit

Permalink
1.2.8pre6 修复版本更新检查的Json解析错误 PreRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginsakura committed Nov 9, 2024
1 parent f1c8f01 commit 0908bb0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

version = '1.2.8rc2'
isPreRelease = True
preVersion = "1.2.8pre5"
preVersion = "1.2.8pre6"
isPreRelease = False

def launcher():
Expand Down
16 changes: 10 additions & 6 deletions MainWindowOldStyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,16 @@ def CheckUpdate(self):
localVersion = float(self.version.replace(".","").replace("rc","."))
try:
response = requests.get("https://api.github.com/repos/ginsakura/MUSYNCSave/releases/latest")
if response.json()["message"][:23] == "API rate limit exceeded":
if messagebox.askyesno("GitHub公共API访问速率已达上限", "是否前往发布页查看是否存在更新?"):
webbrowser.open("https://github.com/Ginsakura/MUSYNCSave/releases/latest")
return
tagVersion = response.json()["tag_name"]
tergetVersion = float(tagVersion.replace(".","").replace("rc","."))
# print(response.json())
resJson = response.json()
if "tag_name" in resJson:
tagVersion = response.json()["tag_name"]
tergetVersion = float(tagVersion.replace(".","").replace("rc","."))
elif "message" in resJson:
if resJson["message"][:23] == "API rate limit exceeded":
if messagebox.askyesno("GitHub公共API访问速率已达上限", "是否前往发布页查看是否存在更新?"):
webbrowser.open("https://github.com/Ginsakura/MUSYNCSave/releases/latest")
return
except Exception as e:
messagebox.showerror("Error", f'发生错误: {e}')
tergetVersion = localVersion
Expand Down
2 changes: 1 addition & 1 deletion Push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ if ($message[0] -eq ""){
$str = $version+' '+$message[0]+' '+$release

echo $str
git pull
git add .
git commit -m $str
git pull
git push
# git tag -a $version -m $message[0]
Read-Host -Prompt "Press Enter to exit"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ HitDelay模块用法:启用DLL注入后,在本次游戏进行首次谱面游玩
1. xxx
-->
### Version 1.2.8
#### Release 3
[ ] 主程序目录通过exe文件进行判断
[ ] 日志工具提上日程
#### PreRelease
1. 更新
1. xxx
2. 修复
1. 修复能够获取版本号时出现Json解析错误的bug
3. 优化
1. xxx
#### Release 2
2. 修复
1. ***修复新用户释放资源时,图标文件名称错误的bug***
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
9. 1.2.7 环境更新:`matplotlib 3.7.2->3.9.2`,`numpy 1.25.2->2.0.1`

### Version 1.2.8
#### PreRelease
1. 修复
1. 修复能够获取版本号时出现Json解析错误的bug
#### Release 2
2. 修复
1. ***修复新用户释放资源时,图标文件名称错误的bug***
Expand Down

0 comments on commit 0908bb0

Please sign in to comment.