diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4c1c18b..6fdd53a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -4,5 +4,5 @@ commit = True tag = True [bumpversion:file:package/setup.py] - +[bumpversion:file:towncrier.toml] [bumpversion:file:package/NeteaseCloudMusic/__init__.py] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a070ccc..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Test Workflow - -on: - push: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Print Python version - run: python --version diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6373c1c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,6 @@ +0.1.7 (2023-12-20) + +### Bugfixes + +- 重新利用Max-Age判断cookie是否过期 (cookie_expires) +- 修复因为补充的encodeURIComponent函数无法识别非字符的True或False而导致的cookie项remberme为空从而使login_refresh接口返回400的问题 (login_refresh) diff --git a/newsfragments/cookie_expires.bugfix.rst b/newsfragments/cookie_expires.bugfix.rst deleted file mode 100644 index 5a67eeb..0000000 --- a/newsfragments/cookie_expires.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -重新利用Max-Age判断cookie是否过期 \ No newline at end of file diff --git a/newsfragments/login_refresh.bugfix.rst b/newsfragments/login_refresh.bugfix.rst deleted file mode 100644 index 436ece1..0000000 --- a/newsfragments/login_refresh.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -修复因为补充的encodeURIComponent函数无法识别非字符的True或False而导致的cookie项remberme为空从而使login_refresh接口返回400的问题 \ No newline at end of file diff --git a/newsfragments/workflow_update.misc.rst b/newsfragments/workflow_update.misc.rst new file mode 100644 index 0000000..e69de29 diff --git a/package/setup.py b/package/setup.py index 1552f7f..6b5480e 100644 --- a/package/setup.py +++ b/package/setup.py @@ -50,8 +50,13 @@ with open(os.path.join(here, 'README.md'), 'w+', encoding='utf-8') as f: print("copy README.md end") try: - with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f: - changelog = f.read() + if os.path.exists(os.path.join(here, '../release_notes.txt')): + # 优先读取release_notes.txt(工作流自动生成的当前版本的更新内容) + with open(os.path.join(here, '../release_notes.txt'), 'r', encoding='utf-8') as f: + changelog = f.read() + else: + with io.open(os.path.join(here, '../CHANGELOG.md'), encoding='utf-8') as f: + changelog = f.read() except FileNotFoundError: changelog = '' @@ -59,7 +64,7 @@ except FileNotFoundError: # Note: this will only work if 'README.md' is present in your MANIFEST.in file! try: with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = '\n' + changelog + '\n' + f.read() + long_description = '\n' + "# 更新信息" + "\n" + changelog + '\n' + f.read() except FileNotFoundError: long_description = DESCRIPTION diff --git a/publish.py b/publish.py index b88dac7..ec6bcbe 100644 --- a/publish.py +++ b/publish.py @@ -9,4 +9,7 @@ subprocess.check_call(['git', 'push']) subprocess.check_call(['git', 'push', '--tags']) # Run towncrier -subprocess.check_call(['towncrier', '--yes']) \ No newline at end of file +subprocess.check_call(['towncrier', '--yes']) + +if not os.path.isdir('./newsfragments'): + os.mkdir('./newsfragments') \ No newline at end of file