summaryrefslogtreecommitdiffstats
path: root/lib/sellershut-core/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sellershut-core/build.rs')
-rw-r--r--lib/sellershut-core/build.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/sellershut-core/build.rs b/lib/sellershut-core/build.rs
index 13e3d06..ff57fec 100644
--- a/lib/sellershut-core/build.rs
+++ b/lib/sellershut-core/build.rs
@@ -1,12 +1,12 @@
-#[cfg(any(feature = "auth", feature = "profile"))]
+#[cfg(any(feature = "auth", feature = "users"))]
enum Entity {
#[cfg(feature = "auth")]
Auth,
- #[cfg(feature = "profile")]
- Profile,
+ #[cfg(feature = "users")]
+ User,
}
-#[cfg(any(feature = "auth", feature = "profile"))]
+#[cfg(any(feature = "auth", feature = "users"))]
impl Entity {
fn protos(&self) -> Vec<&'static str> {
let mut res: Vec<&'static str> = vec![];
@@ -16,9 +16,9 @@ impl Entity {
Entity::Auth => {
res.extend(vec!["proto/auth/auth.proto"]);
}
- #[cfg(feature = "profile")]
- Entity::Profile => {
- res.extend(vec!["proto/profile/profile.proto"]);
+ #[cfg(feature = "users")]
+ Entity::User => {
+ res.extend(vec!["proto/users/users.proto"]);
}
}
res
@@ -31,13 +31,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg(feature = "auth")]
build_proto("auth", Entity::Auth);
- #[cfg(feature = "profile")]
- build_proto("profile", Entity::Profile);
+ #[cfg(feature = "users")]
+ build_proto("users", Entity::User);
Ok(())
}
-#[cfg(any(feature = "auth", feature = "profile"))]
+#[cfg(any(feature = "auth", feature = "users"))]
fn build_proto(package: &str, entity: Entity) {
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
@@ -81,7 +81,7 @@ fn build_proto(package: &str, entity: Entity) {
.compile_protos(&entity.protos(), include_paths).unwrap();
}
-#[cfg(all(feature = "serde", any(feature = "auth", feature = "profile")))]
+#[cfg(all(feature = "serde", any(feature = "auth", feature = "users")))]
fn add_serde(config: tonic_build::Builder) -> tonic_build::Builder {
config.type_attribute(
".",