Skip to content

Commit 6089caa

Browse files
committed
chore:add publish.py
1 parent 26d8230 commit 6089caa

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ print(api_list())
5050
├── test.py 手动测试/ 使用示例
5151
```
5252
53-
### 更新
53+
#### 更新
5454
项目使用towncrier自动生成更新日志
5555
5656
在 newsfragments 目录下,创建一个新的文本文件。这个文件的名字应该是一个唯一的编号,后缀是 .rst。
@@ -66,7 +66,11 @@ print(api_list())
6666
在这个文件中,写下你的更改的描述。这个描述应该是简短的,通常只有一到两句话。
6767
例如`Added support for the XYZ feature.`
6868
69-
### 发布新版本
69+
#### 发布新版本
70+
自动:
71+
运行 python publish.py
72+
73+
手动:
7074
使用bumpversion自动更新版本号,提交并发布标签
7175
你需要安装bumpversion然后执行
7276
```bash

package/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
print("copy README.md end")
5151

5252
try:
53-
with io.open(os.path.join(here, 'CHANGELOG.md'), encoding='utf-8') as f:
53+
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f:
5454
changelog = f.read()
5555
except FileNotFoundError:
5656
changelog = ''

publish.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import os
2+
import subprocess
3+
4+
# Bump version
5+
subprocess.check_call(['bumpversion', 'patch'])
6+
7+
# Push changes to remote
8+
subprocess.check_call(['git', 'push'])
9+
subprocess.check_call(['git', 'push', '--tags'])
10+
11+
# Run towncrier
12+
subprocess.check_call(['towncrier', '--yes'])

test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pprint import pprint
88
import dotenv
99

10-
from package.NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
10+
from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
1111

1212
# from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
1313

@@ -112,7 +112,7 @@ def login_refresh():
112112
pass
113113
# print(api_list())
114114
# print(api_help())
115-
song_url_v1_test()
115+
# song_url_v1_test()
116116
# top_mv_test()
117117
# search_test()
118118
# search_default_test()
@@ -122,6 +122,6 @@ def login_refresh():
122122
# top_playlist_highquality_test()
123123
# captcha_sent_test()
124124
# login_cellphone_test()
125-
user_account_test()
125+
# user_account_test()
126126
# playlist_track_all_test()
127-
# login_refresh()
127+
login_refresh()

0 commit comments

Comments
 (0)