mirror of
https://github.com/2061360308/NeteaseCloudMusic_PythonSDK.git
synced 2024-11-22 06:57:42 +00:00
chore:add publish.py
This commit is contained in:
parent
26d823031b
commit
6089caa183
@ -50,7 +50,7 @@ print(api_list())
|
|||||||
├── test.py 手动测试/ 使用示例
|
├── test.py 手动测试/ 使用示例
|
||||||
```
|
```
|
||||||
|
|
||||||
### 更新
|
#### 更新
|
||||||
项目使用towncrier自动生成更新日志
|
项目使用towncrier自动生成更新日志
|
||||||
|
|
||||||
在 newsfragments 目录下,创建一个新的文本文件。这个文件的名字应该是一个唯一的编号,后缀是 .rst。
|
在 newsfragments 目录下,创建一个新的文本文件。这个文件的名字应该是一个唯一的编号,后缀是 .rst。
|
||||||
@ -66,7 +66,11 @@ print(api_list())
|
|||||||
在这个文件中,写下你的更改的描述。这个描述应该是简短的,通常只有一到两句话。
|
在这个文件中,写下你的更改的描述。这个描述应该是简短的,通常只有一到两句话。
|
||||||
例如`Added support for the XYZ feature.`
|
例如`Added support for the XYZ feature.`
|
||||||
|
|
||||||
### 发布新版本
|
#### 发布新版本
|
||||||
|
自动:
|
||||||
|
运行 python publish.py
|
||||||
|
|
||||||
|
手动:
|
||||||
使用bumpversion自动更新版本号,提交并发布标签
|
使用bumpversion自动更新版本号,提交并发布标签
|
||||||
你需要安装bumpversion然后执行
|
你需要安装bumpversion然后执行
|
||||||
```bash
|
```bash
|
||||||
|
@ -50,7 +50,7 @@ with open(os.path.join(here, 'README.md'), 'w+', encoding='utf-8') as f:
|
|||||||
print("copy README.md end")
|
print("copy README.md end")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with io.open(os.path.join(here, 'CHANGELOG.md'), encoding='utf-8') as f:
|
with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f:
|
||||||
changelog = f.read()
|
changelog = f.read()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
changelog = ''
|
changelog = ''
|
||||||
|
12
publish.py
Normal file
12
publish.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
# Bump version
|
||||||
|
subprocess.check_call(['bumpversion', 'patch'])
|
||||||
|
|
||||||
|
# Push changes to remote
|
||||||
|
subprocess.check_call(['git', 'push'])
|
||||||
|
subprocess.check_call(['git', 'push', '--tags'])
|
||||||
|
|
||||||
|
# Run towncrier
|
||||||
|
subprocess.check_call(['towncrier', '--yes'])
|
8
test.py
8
test.py
@ -7,7 +7,7 @@ from enum import Enum
|
|||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
import dotenv
|
import dotenv
|
||||||
|
|
||||||
from package.NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
|
from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
|
||||||
|
|
||||||
# from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
|
# from NeteaseCloudMusic import NeteaseCloudMusicApi, api_help, api_list
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ if __name__ == '__main__':
|
|||||||
pass
|
pass
|
||||||
# print(api_list())
|
# print(api_list())
|
||||||
# print(api_help())
|
# print(api_help())
|
||||||
song_url_v1_test()
|
# song_url_v1_test()
|
||||||
# top_mv_test()
|
# top_mv_test()
|
||||||
# search_test()
|
# search_test()
|
||||||
# search_default_test()
|
# search_default_test()
|
||||||
@ -122,6 +122,6 @@ if __name__ == '__main__':
|
|||||||
# top_playlist_highquality_test()
|
# top_playlist_highquality_test()
|
||||||
# captcha_sent_test()
|
# captcha_sent_test()
|
||||||
# login_cellphone_test()
|
# login_cellphone_test()
|
||||||
user_account_test()
|
# user_account_test()
|
||||||
# playlist_track_all_test()
|
# playlist_track_all_test()
|
||||||
# login_refresh()
|
login_refresh()
|
||||||
|
Loading…
Reference in New Issue
Block a user