-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=migrations"); | ||
|
||
let protos_path = std::env::var("SEABIRD_PROTO_PATH").unwrap_or_else(|_| "./proto".to_string()); | ||
|
||
// NOTE: we need to use configure rather than the simple case because both | ||
// seabird and seabird_chat_ingest use the same package name. This also gives | ||
// us the option to disable client generation so we do that. | ||
tonic_build::configure() | ||
.build_client(false) | ||
.build_server(true) | ||
.compile( | ||
&["./proto/seabird.proto", "./proto/seabird_chat_ingest.proto"], | ||
&["./proto"], | ||
&["seabird.proto", "seabird_chat_ingest.proto"], | ||
&[&protos_path], | ||
) | ||
.unwrap(); | ||
} |