Skip to content

Commit 76746f7

Browse files
committed
feat: append build commit id to about version line
1 parent 5a0062d commit 76746f7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/bot.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,11 +3231,10 @@ mod tests {
32313231
}
32323232

32333233
#[test]
3234-
fn about_text_includes_build_commit_line() {
3234+
fn about_text_includes_build_commit_in_version_line() {
32353235
let text = super::build_about_text();
32363236
assert!(text.contains(&format!("v{}", env!("CARGO_PKG_VERSION"))));
3237-
assert!(text.contains("构建提交:<code>"));
3238-
assert!(text.contains(super::BUILD_GIT_COMMIT));
3237+
assert!(text.contains(&format!("(<code>{}</code>)", super::BUILD_GIT_COMMIT)));
32393238
}
32403239
}
32413240

@@ -3332,8 +3331,7 @@ const BUILD_GIT_COMMIT: &str = match option_env!("BUILD_GIT_COMMIT") {
33323331

33333332
fn build_about_text() -> String {
33343333
format!(
3335-
r"🎵 Music163bot-Rust v{}
3336-
构建提交:<code>{}</code>
3334+
r"🎵 Music163bot-Rust v{} (<code>{}</code>)
33373335
33383336
一个用来下载/分享/搜索网易云歌曲的 Telegram Bot
33393337

0 commit comments

Comments
 (0)