Skip to content

Commit

Permalink
Fix env-config version env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Apr 20, 2023
1 parent 7e370a8 commit 92d26c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions libraries/env-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub fn generate_env_config_constants() {
)
.unwrap();

let major = env!("CARGO_PKG_VERSION_MAJOR");
let minor = env!("CARGO_PKG_VERSION_MINOR");
let patch = env!("CARGO_PKG_VERSION_PATCH");
let major = env::var("CARGO_PKG_VERSION_MAJOR").unwrap();
let minor = env::var("CARGO_PKG_VERSION_MINOR").unwrap();
let patch = env::var("CARGO_PKG_VERSION_PATCH").unwrap();
writeln!(&mut config_file, "pub const FIRMWARE_VERSION: FirmwareVersion = FirmwareVersion::new({major}, {minor}, {patch});").unwrap();
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION_MAJOR");
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION_MINOR");
Expand Down

0 comments on commit 92d26c7

Please sign in to comment.