Skip to content

Commit

Permalink
feat: Remove dotenvy_macro crate from dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yuezk committed Jun 15, 2024
1 parent c52d2bc commit 79083e5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
19 changes: 0 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ uzers = "0.11"
whoami = "1"
thiserror = "1"
redact-engine = "0.1"
dotenvy_macro = "0.15"
compile-time = "0.2"
serde_urlencoded = "0.7"
md5="0.7"
Expand Down
2 changes: 1 addition & 1 deletion apps/gpclient/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(crate) struct SharedArgs {
#[derive(Subcommand)]
enum CliCommand {
#[command(about = "Connect to a portal server")]
Connect(ConnectArgs),
Connect(Box<ConnectArgs>),
#[command(about = "Disconnect from the server")]
Disconnect,
#[command(about = "Launch the GUI")]
Expand Down
1 change: 0 additions & 1 deletion crates/gpapi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ chacha20poly1305 = { version = "0.10", features = ["std"] }
redact-engine.workspace = true
url.workspace = true
regex.workspace = true
dotenvy_macro.workspace = true
uzers.workspace = true
serde_urlencoded.workspace = true
md5.workspace = true
Expand Down
19 changes: 19 additions & 0 deletions crates/gpapi/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::path::Path;

fn main() {
let manifest_dir = env!("CARGO_MANIFEST_DIR");
let workspace_dir = Path::new(manifest_dir).ancestors().nth(2).unwrap();
let gpgui_dir = workspace_dir.parent().unwrap().join("gpgui");

let gp_service_binary = workspace_dir.join("target/debug/gpservice");
let gp_client_binary = workspace_dir.join("target/debug/gpclient");
let gp_auth_binary = workspace_dir.join("target/debug/gpauth");
let gp_gui_helper_binary = workspace_dir.join("target/debug/gpgui-helper");
let gp_gui_binary = gpgui_dir.join("target/debug/gpgui");

println!("cargo:rustc-env=GP_SERVICE_BINARY={}", gp_service_binary.display());
println!("cargo:rustc-env=GP_CLIENT_BINARY={}", gp_client_binary.display());
println!("cargo:rustc-env=GP_AUTH_BINARY={}", gp_auth_binary.display());
println!("cargo:rustc-env=GP_GUI_HELPER_BINARY={}", gp_gui_helper_binary.display());
println!("cargo:rustc-env=GP_GUI_BINARY={}", gp_gui_binary.display());
}
10 changes: 5 additions & 5 deletions crates/gpapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ pub const GP_GUI_HELPER_BINARY: &str = "/usr/bin/gpgui-helper";
pub(crate) const GP_AUTH_BINARY: &str = "/usr/bin/gpauth";

#[cfg(debug_assertions)]
pub const GP_CLIENT_BINARY: &str = dotenvy_macro::dotenv!("GP_CLIENT_BINARY");
pub const GP_CLIENT_BINARY: &str = env!("GP_CLIENT_BINARY");
#[cfg(debug_assertions)]
pub const GP_SERVICE_BINARY: &str = dotenvy_macro::dotenv!("GP_SERVICE_BINARY");
pub const GP_SERVICE_BINARY: &str = env!("GP_SERVICE_BINARY");
#[cfg(debug_assertions)]
pub const GP_GUI_BINARY: &str = dotenvy_macro::dotenv!("GP_GUI_BINARY");
pub const GP_GUI_BINARY: &str = env!("GP_GUI_BINARY");
#[cfg(debug_assertions)]
pub const GP_GUI_HELPER_BINARY: &str = dotenvy_macro::dotenv!("GP_GUI_HELPER_BINARY");
pub const GP_GUI_HELPER_BINARY: &str = env!("GP_GUI_HELPER_BINARY");
#[cfg(debug_assertions)]
pub(crate) const GP_AUTH_BINARY: &str = dotenvy_macro::dotenv!("GP_AUTH_BINARY");
pub(crate) const GP_AUTH_BINARY: &str = env!("GP_AUTH_BINARY");

0 comments on commit 79083e5

Please sign in to comment.