From 6e6a65ee5686bb873eac7c2b79a5fe0d2fc4b464 Mon Sep 17 00:00:00 2001 From: peeeuzin Date: Sun, 24 Mar 2024 14:15:05 -0300 Subject: [PATCH] feat: avoid to create hooky to project that uses dustdata --- .cargo/config.toml | 2 ++ Cargo.toml | 8 +++++++- src/build.rs | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..2279b9a --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[env] +RUN_HOOKY = "true" diff --git a/Cargo.toml b/Cargo.toml index ccd2638..efb69cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,13 @@ repository = "https://github.com/rustbase/dustdata" homepage = "https://github.com/rustbase/dustdata" authors = ["Rustbase"] license = "MIT" -exclude = ["test_data/*", "README.md", "CONTRIBUTING.md", ".editorconfig"] +exclude = [ + "test_data/*", + "README.md", + "CONTRIBUTING.md", + ".editorconfig", + ".cargo/*", +] build = "./src/build.rs" [lib] diff --git a/src/build.rs b/src/build.rs index 9d9d30a..ced3dcf 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1,3 +1,7 @@ fn main() { - hooky::init(true) + let run_hooky = std::env::var("RUN_HOOKY").unwrap(); + + if run_hooky == "true" { + hooky::init(true) + } }