Skip to content

Commit

Permalink
build: use repository to detect public or private repo
Browse files Browse the repository at this point in the history
in case private and public crate use the same name
  • Loading branch information
fouge committed Jun 12, 2024
1 parent 559b27e commit 85ba36e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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.");

Expand Down

0 comments on commit 85ba36e

Please sign in to comment.