Rendre le système de fichier de configuration runtime fonctionnel en dev et en release #56

Merged
florian_briand merged 2 commits from fix/55_move_env_config_into_consistent_dirs into main 2024-08-30 18:29:56 +02:00
Showing only changes of commit f16986ce26 - Show all commits

View File

@ -1,13 +1,13 @@
extern crate dotenv;
use std::env;
use std::path::PathBuf;
use dotenv::from_path;
fn main() {
// Load the .env.build file for build-time environment variables
let manifest_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR must be set");
let manifest_path = PathBuf::from(manifest_dir);
dotenv::from_path(manifest_path.join(".env.build")).ok();
from_path(manifest_path.join(".env.build")).ok();
println!("cargo::rerun-if-env-changed=SESAM_FSV_LIB_PATH");
println!("cargo::rerun-if-env-changed=SESAM_FSV_SSVLIB");