修改版本号机制

This commit is contained in:
shenjack 2024-03-15 12:27:00 +08:00
parent 84c0426b05
commit e0dbf7d21e
Signed by: shenjack
GPG Key ID: 7B1134A979775551
5 changed files with 1249 additions and 61 deletions

1279
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,17 +8,13 @@ edition = "2021"
[features]
default = ["ica"]
ica = ["dep:ed25519", "dep:ed25519-dalek", "dep:hex", "dep:rust_socketio"]
matrix = ["dep:ruma"]
matrix = ["dep:matrix-sdk", "dep:url"]
[dependencies]
# matrix
ruma = { version = "0.9.4", features = [
"client-api-c",
"client-ext-client-api",
"client-reqwest",
"rand",
], optional = true }
url = { version = "2.5.0", optional = true }
matrix-sdk = { version = "0.7.1", optional = true }
# ica
ed25519 = { version = "2.2.3", optional = true }
@ -29,12 +25,12 @@ rust_socketio = { version = "0.4.4", features = ["async"], optional = true }
# data
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = "0.4.34"
toml = "0.8.10"
chrono = "0.4.35"
toml = "0.8.11"
colored = "2.1.0"
# runtime
tokio = { version = "1.0", features = ["full"] }
tokio = { version = "1.36", features = ["full"] }
futures-util = "0.3.30"
pyo3 = "0.20.3"
anyhow = { version = "1.0.81", features = ["backtrace"] }

View File

@ -19,7 +19,7 @@ class IcaStatus:
此类并不存储信息, 所有方法都是实时获取
"""
@property
def login(self) -> bool:
def qq_login(self) -> bool:
...
@property
def online(self) -> bool:
@ -43,7 +43,7 @@ class IcaStatus:
def head_used(self) -> str:
...
@property
def load_average(self) -> str:
def load(self) -> str:
...
@ -118,6 +118,12 @@ class IcaClient:
@property
def version() -> str:
...
@property
def ica_version() -> str:
"""shenbot ica 的版本号"""
@property
def matrix_version() -> str:
"""shenbot matrix 的版本号"""
def debug(self, message: str) -> None:
"""向日志中输出调试信息"""

View File

@ -21,7 +21,7 @@ pub static mut MAIN_STATUS: status::BotStatus = status::BotStatus {
pub type MainStatus = status::BotStatus;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const ICA_VERSION: &str = "0.5.2";
pub const ICA_VERSION: &str = "1.4.0";
pub const MATRIX_VERSION: &str = "0.1.0";
#[macro_export]

View File

@ -5,6 +5,9 @@
重构了一整波, 还没改 `ica-typing.py` 的代码
但至少能用了
- Ica 版本号 `1.4.0`
- Matrix 版本号 `0.1.0`
## 0.5.0
准备接入 `Matrix`