From 176fcf6fb761cb42ab25ebf447ee226955c54fef Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 27 Jul 2026 22:53:32 +0800 Subject: chore: move config files to .config directory --- .config/verified-docs.toml | 8 ++++++++ .config/version-files.toml | 23 +++++++++++++++++++++++ .run/src/bin/test-all-markdown-code.rs | 2 +- .run/src/bin/update-version.rs | 6 +++--- .run/version-files.toml | 23 ----------------------- verified-docs.toml | 8 -------- 6 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 .config/verified-docs.toml create mode 100644 .config/version-files.toml delete mode 100644 .run/version-files.toml delete mode 100644 verified-docs.toml diff --git a/.config/verified-docs.toml b/.config/verified-docs.toml new file mode 100644 index 0000000..f3b1f85 --- /dev/null +++ b/.config/verified-docs.toml @@ -0,0 +1,8 @@ +# Files marked in the following document, +# all rust code blocks inside will be verified in CI to ensure they can compile + +[verified] +readme = "./README.md" +getting_started = "./GETTING_STARTED.md" +documents_en_us = "./docs/pages/**" +documents_zh_cn = "./docs/_zh_CN/pages/**" diff --git a/.config/version-files.toml b/.config/version-files.toml new file mode 100644 index 0000000..b69a568 --- /dev/null +++ b/.config/version-files.toml @@ -0,0 +1,23 @@ +[[file]] +file = "./Cargo.toml" +pattern = "version = \"{VER}\"" + +[[file]] +file = "./README.md" +pattern = "version = \"{VER}\"" + +[[file]] +file = "./docs/_zh_CN/pages/1-getting-started.md" +pattern = "version = \"{VER}\"" + +[[file]] +file = "./docs/pages/1-getting-started.md" +pattern = "version = \"{VER}\"" + +[[file]] +file = "./docs/res/guide.txt" +pattern = "mingling = \"{VER}\"" + +[[file]] +file = "./mingling_core/src/lib.rs" +pattern = "mingling = \"{VER}\"" diff --git a/.run/src/bin/test-all-markdown-code.rs b/.run/src/bin/test-all-markdown-code.rs index 1c0c9e2..35c8bbe 100644 --- a/.run/src/bin/test-all-markdown-code.rs +++ b/.run/src/bin/test-all-markdown-code.rs @@ -21,7 +21,7 @@ async fn main() { #[cfg(windows)] let _ = colored::control::set_virtual_terminal(true); - let config_path = PathBuf::from("verified-docs.toml"); + let config_path = PathBuf::from(".config/verified-docs.toml"); if !config_path.exists() { eprintln_cargo_style!("verified-docs.toml not found in current directory"); std::process::exit(1); diff --git a/.run/src/bin/update-version.rs b/.run/src/bin/update-version.rs index 9d595bb..2283662 100644 --- a/.run/src/bin/update-version.rs +++ b/.run/src/bin/update-version.rs @@ -56,11 +56,11 @@ fn main() { println_cargo_style!("Version: {} -> {}", current_ver, new_ver); // Read version-files.toml - let config_path = Path::new(".run").join("version-files.toml"); + let config_path = Path::new(".config").join("version-files.toml"); let config_str = - std::fs::read_to_string(&config_path).expect("Failed to read .run/version-files.toml"); + std::fs::read_to_string(&config_path).expect("Failed to read .config/version-files.toml"); let config: Config = - toml::from_str(&config_str).expect("Failed to parse .run/version-files.toml"); + toml::from_str(&config_str).expect("Failed to parse .config/version-files.toml"); let mut updated_count = 0; let mut skipped_count = 0; diff --git a/.run/version-files.toml b/.run/version-files.toml deleted file mode 100644 index b69a568..0000000 --- a/.run/version-files.toml +++ /dev/null @@ -1,23 +0,0 @@ -[[file]] -file = "./Cargo.toml" -pattern = "version = \"{VER}\"" - -[[file]] -file = "./README.md" -pattern = "version = \"{VER}\"" - -[[file]] -file = "./docs/_zh_CN/pages/1-getting-started.md" -pattern = "version = \"{VER}\"" - -[[file]] -file = "./docs/pages/1-getting-started.md" -pattern = "version = \"{VER}\"" - -[[file]] -file = "./docs/res/guide.txt" -pattern = "mingling = \"{VER}\"" - -[[file]] -file = "./mingling_core/src/lib.rs" -pattern = "mingling = \"{VER}\"" diff --git a/verified-docs.toml b/verified-docs.toml deleted file mode 100644 index f3b1f85..0000000 --- a/verified-docs.toml +++ /dev/null @@ -1,8 +0,0 @@ -# Files marked in the following document, -# all rust code blocks inside will be verified in CI to ensure they can compile - -[verified] -readme = "./README.md" -getting_started = "./GETTING_STARTED.md" -documents_en_us = "./docs/pages/**" -documents_zh_cn = "./docs/_zh_CN/pages/**" -- cgit