From 93e32a2573b44b22b790abeec9ca6af4b84cc694 Mon Sep 17 00:00:00 2001 From: Cyril Fougeray Date: Wed, 12 Jun 2024 16:58:26 +0200 Subject: [PATCH] build: use repository to detect public or private repo (#32) in case private and public crate use the same name --- build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 47ac5ef..92c7148 100644 --- a/build.rs +++ b/build.rs @@ -6,7 +6,8 @@ fn main() { // NOTE: We cannot use `CARGO_MANIFEST_DIR`, because protoc doesn't work well with // absolute paths. #[allow(clippy::eq_op)] - let is_public = env!("CARGO_PKG_NAME") == "orb-messages"; + let is_public = + env!("CARGO_PKG_REPOSITORY") == "https://github.com/worldcoin/orb-messages"; let (messages_dir, priv_dir) = if is_public { println!("cargo:warning=Be aware that private definitions are stubbed out when building the public crate.");