🔖 liteyuki 6.3.6

This commit is contained in:
远野千束 2024-08-18 21:45:11 +08:00
parent 1af95a15aa
commit 9c35abc6e2
4 changed files with 17 additions and 28 deletions

View File

@ -20,5 +20,17 @@ jobs:
- uses: pdm-project/setup-pdm@v3
- name: Check version
run: |
current_version=$(pdm show --json | jq -r '.version')
echo "Current version: $current_version"
package_name=$(pdm show --json | jq -r '.name')
last_version=$(curl -s https://pypi.org/pypi/$package_name/json | jq -r '.info.version')
echo "Last version on PyPI: $last_version"
if [ "$current_version" == "$last_version" ]; then
echo "Version has not been updated."
exit 1
fi
- name: Publish package distributions to PyPI
run: pdm publish

View File

@ -20,8 +20,6 @@ from liteyuki.log import (
logger
)
from liteyuki.version import __version__
__all__ = [
"LiteyukiBot",
@ -34,7 +32,8 @@ __all__ = [
"load_plugins",
"init_log",
"logger",
"__version__"
]
__version__ = "6.3.6"

View File

@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
"""
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@Time : 2024/8/18 上午3:49
@Author : snowykami
@Email : snowykami@outlook.com
@File : version.py.py
@Software: PyCharm
"""
from datetime import datetime
from pdm.backend.hooks.version import SCMVersion
__datetime__ = datetime.now().strftime("%Y%m%d%H%M%S")
__version__ = "6.3.6"
def format_version(version: SCMVersion) -> str:
return f"{__version__}.dev{__datetime__}"

View File

@ -30,7 +30,7 @@ Repository = "https://github.com/LiteyukiStudio/LiteyukiBot"
[build-system]
requires = ["pdm-backend", "loguru", "pydantic", "PyYAML", "toml", "watchdog"]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
@ -38,6 +38,5 @@ includes = ["liteyuki/", "LICENSE", "README.md"]
excludes = ["tests/", "docs/", "src/"]
[tool.pdm.version]
source = "scm"
version_format = "liteyuki.version:format_version"
fallback_version = "6.0.0"
source = "file"
path = "liteyuki/__init__.py"