ipv4 or ipv6 parsed from .env file
This commit is contained in:
@@ -5,6 +5,7 @@ fn main() {
|
||||
println!("cargo:rerun-if-changed={}", dotenv_path.display());
|
||||
}
|
||||
|
||||
// Pass WIFI credentials into firmware
|
||||
if let Ok(ssid) = std::env::var("SSID") {
|
||||
println!("cargo:rustc-env=SSID={}", ssid);
|
||||
}
|
||||
@@ -12,8 +13,16 @@ fn main() {
|
||||
println!("cargo:rustc-env=PASSWORD={}", password);
|
||||
}
|
||||
|
||||
// Export BROKER_IP and PORT as string envs also (optional, for debugging)
|
||||
if let Ok(ip) = std::env::var("BROKER_IP") {
|
||||
println!("cargo:rustc-env=BROKER_IP={}", ip);
|
||||
}
|
||||
if let Ok(port) = std::env::var("BROKER_PORT") {
|
||||
println!("cargo:rustc-env=BROKER_PORT={}", port);
|
||||
}
|
||||
|
||||
linker_be_nice();
|
||||
// make sure linkall.x is the last linker script (otherwise might cause problems with flip-link)
|
||||
// make sure linkall.x is the last linker script
|
||||
println!("cargo:rustc-link-arg=-Tlinkall.x");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user