Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4374cde

Browse files
committed
fix: weasel will open new browser window if new version got.
chore: make update_weasel_appcast.py working with lower version of python, python 3.10 tested
1 parent aa51c81 commit 4374cde

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

blog/update_weasel_appcast.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def format_time(time_str):
4646

4747
# get release notes link
4848
if tags_name[latest_index] == "latest":
49-
releaseNotesLink = "https://github.com/rime/weasel/releases/tag/latest"
49+
releaseNotesLink = "http://github.com/rime/weasel/releases/tag/latest/index.html"
5050
else:
51-
releaseNotesLink = "http://rime.github.io/testing/weasel/"
51+
releaseNotesLink = "http://rime.github.io/testing/weasel/index.html"
5252
# format xml file content
5353
template = f"""<?xml version="1.0" encoding="utf-8"?>
5454
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
@@ -85,7 +85,7 @@ def format_time(time_str):
8585
break
8686
if 'release_url' not in locals():
8787
print("release_url not found, using default url")
88-
release_url = f"https://github.com/rime/weasel/releases/download/{release_json["tag_name"]}/weasel-{release_json["tag_name"]}.0-installer.exe"
88+
release_url = f"https://github.com/rime/weasel/releases/download/{release_json['tag_name']}/weasel-{release_json['tag_name']}.0-installer.exe"
8989
# update appcast.xml
9090
template_release = f"""<?xml version="1.0" encoding="utf-8"?>
9191
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
@@ -96,7 +96,7 @@ def format_time(time_str):
9696
<language>zh</language>
9797
<item>
9898
<title>小狼毫 {release_json["tag_name"]}</title>
99-
<sparkle:releaseNotesLink>http://rime.github.io/release/weasel/</sparkle:releaseNotesLink>
99+
<sparkle:releaseNotesLink>http://rime.github.io/release/weasel/index.html</sparkle:releaseNotesLink>
100100
<pubDate>{release_formatted_time}</pubDate>
101101
<enclosure url="{release_url}"
102102
sparkle:version="{release_json["tag_name"]}"

0 commit comments

Comments
 (0)