Skip to content

Commit bc79a64

Browse files
committed
chore: fix workflow erros
1 parent b9e7360 commit bc79a64

File tree

8 files changed

+19
-29
lines changed

8 files changed

+19
-29
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ commit = True
44
tag = True
55

66
[bumpversion:file:package/setup.py]
7-
7+
[bumpversion:file:towncrier.toml]
88
[bumpversion:file:package/NeteaseCloudMusic/__init__.py]

.github/workflows/test.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
0.1.7 (2023-12-20)
2+
3+
### Bugfixes
4+
5+
- 重新利用Max-Age判断cookie是否过期 (cookie_expires)
6+
- 修复因为补充的encodeURIComponent函数无法识别非字符的True或False而导致的cookie项remberme为空从而使login_refresh接口返回400的问题 (login_refresh)

newsfragments/cookie_expires.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/login_refresh.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

newsfragments/workflow_update.misc.rst

Whitespace-only changes.

package/setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,21 @@
5050
print("copy README.md end")
5151

5252
try:
53-
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f:
54-
changelog = f.read()
53+
if os.path.exists(os.path.join(here, '../release_notes.txt')):
54+
# 优先读取release_notes.txt(工作流自动生成的当前版本的更新内容)
55+
with open(os.path.join(here, '../release_notes.txt'), 'r', encoding='utf-8') as f:
56+
changelog = f.read()
57+
else:
58+
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f:
59+
changelog = f.read()
5560
except FileNotFoundError:
5661
changelog = ''
5762

5863
# Import the README and use it as the long-description.
5964
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
6065
try:
6166
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
62-
long_description = '\n' + changelog + '\n' + f.read()
67+
long_description = '\n' + "# 更新信息" + "\n" + changelog + '\n' + f.read()
6368
except FileNotFoundError:
6469
long_description = DESCRIPTION
6570

publish.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99
subprocess.check_call(['git', 'push', '--tags'])
1010

1111
# Run towncrier
12-
subprocess.check_call(['towncrier', '--yes'])
12+
subprocess.check_call(['towncrier', '--yes'])
13+
14+
if not os.path.isdir('./newsfragments'):
15+
os.mkdir('./newsfragments')

0 commit comments

Comments
 (0)