From a85f8146909469185e4bd023db6545393e9299e0 Mon Sep 17 00:00:00 2001 From: Goran Brkuljan Date: Wed, 21 Feb 2024 14:41:51 +0100 Subject: [PATCH] update: ignore non .rs files in migrate --- Cargo.lock | 8 ++++---- charybdis-migrate/Cargo.toml | 4 ++-- charybdis/Cargo.toml | 4 ++-- charybdis_macros/Cargo.toml | 4 ++-- charybdis_parser/Cargo.toml | 2 +- charybdis_parser/src/schema/code_schema.rs | 4 +++- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffaf230..f56e149 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -181,7 +181,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "charybdis" -version = "0.4.0" +version = "0.4.1" dependencies = [ "charybdis_macros", "chrono", @@ -196,7 +196,7 @@ dependencies = [ [[package]] name = "charybdis-migrate" -version = "0.4.0" +version = "0.4.1" dependencies = [ "charybdis_parser", "clap", @@ -211,7 +211,7 @@ dependencies = [ [[package]] name = "charybdis_macros" -version = "0.4.0" +version = "0.4.1" dependencies = [ "charybdis_parser", "darling", @@ -222,7 +222,7 @@ dependencies = [ [[package]] name = "charybdis_parser" -version = "0.4.0" +version = "0.4.1" dependencies = [ "colored", "darling", diff --git a/charybdis-migrate/Cargo.toml b/charybdis-migrate/Cargo.toml index 7566862..4e86c48 100644 --- a/charybdis-migrate/Cargo.toml +++ b/charybdis-migrate/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "charybdis-migrate" rust-version = "1.75.0" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "Automatic Migration Tool for Charybdis ORM" repository = "https://github.com/nodecosmos/charybdis" license = "MIT" [dependencies] -charybdis_parser = { version = "0.4.0", path = "../charybdis_parser" } +charybdis_parser = { version = "0.4.1", path = "../charybdis_parser" } scylla = "0.12.0" tokio = { version = "1.27.0", features = ["full"] } serde_json = "1.0.95" diff --git a/charybdis/Cargo.toml b/charybdis/Cargo.toml index 287857c..ecbf1c8 100644 --- a/charybdis/Cargo.toml +++ b/charybdis/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "charybdis" rust-version = "1.75.0" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "High-Performance ORM for ScyllaDB" repository = "https://github.com/nodecosmos/charybdis" @@ -10,7 +10,7 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -charybdis_macros = { version = "0.4.0", path = "../charybdis_macros" } +charybdis_macros = { version = "0.4.1", path = "../charybdis_macros" } chrono = { version = "0.4.24", features = ["serde"] } futures = "0.3.28" num-bigint = "0.4.3" diff --git a/charybdis_macros/Cargo.toml b/charybdis_macros/Cargo.toml index c4ba4c5..f2e9f96 100644 --- a/charybdis_macros/Cargo.toml +++ b/charybdis_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "charybdis_macros" rust-version = "1.75.0" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "Proc macro crate for Charybdis ORM" repository = "https://github.com/nodecosmos/charybdis" @@ -11,7 +11,7 @@ license = "MIT" proc-macro = true [dependencies] -charybdis_parser = { version = "0.4.0", path = "../charybdis_parser" } +charybdis_parser = { version = "0.4.1", path = "../charybdis_parser" } proc-macro2 = "1.0.64" syn = { version = "2.0.10", features = ["full"] } quote = "1.0.26" diff --git a/charybdis_parser/Cargo.toml b/charybdis_parser/Cargo.toml index 95d24ce..1bb190a 100644 --- a/charybdis_parser/Cargo.toml +++ b/charybdis_parser/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "charybdis_parser" rust-version = "1.75.0" -version = "0.4.0" +version = "0.4.1" edition = "2021" description = "Parser crate for Charybdis ORM" repository = "https://github.com/nodecosmos/charybdis" diff --git a/charybdis_parser/src/schema/code_schema.rs b/charybdis_parser/src/schema/code_schema.rs index 120de86..d796232 100644 --- a/charybdis_parser/src/schema/code_schema.rs +++ b/charybdis_parser/src/schema/code_schema.rs @@ -35,7 +35,9 @@ impl CodeSchema { let entry: DirEntry = entry.unwrap(); if entry.path().is_file() { - if entry.path().to_str().unwrap().contains("mod.rs") { + let path = entry.path().to_str().unwrap(); + + if path.contains("mod.rs") || !path.ends_with(".rs") { continue; }