using cargo.toml version (#1813)

- Replaced `CFG_RELEASE` with `CARGO_PKG_VERSION`
- No rerun on `CFG_RELEASE`
This commit is contained in:
hem1t authored and GitHub committed 2024-01-11 13:50:23 -06:00
1 parent 663296ae45
commit 8be9a7192b
2 files changed
+1 -6

No files matched your search

-5
View File
@@ -5,14 +5,9 @@ use std::{env, path::PathBuf, process::Command};
fn main() {
set_rerun();
set_commit_info();
if option_env!("CFG_RELEASE").is_none() {
println!("cargo:rustc-env=POKE_RA_DEVS=1");
}
}
fn set_rerun() {
println!("cargo:rerun-if-env-changed=CFG_RELEASE");
let mut manifest_dir = PathBuf::from(
env::var("CARGO_MANIFEST_DIR").expect("`CARGO_MANIFEST_DIR` is always set by cargo."),
);