fix(build): rerun if cli version changed (#1789)

- Close https://github.com/napi-rs/napi-rs/issues/1719
This commit is contained in:
LongYinan 2023-11-06 14:03:34 +08:00 committed by GitHub
parent dac073805b
commit b03b3ee4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ mod wasi;
pub fn setup() { pub fn setup() {
println!("cargo:rerun-if-env-changed=DEBUG_GENERATED_CODE"); println!("cargo:rerun-if-env-changed=DEBUG_GENERATED_CODE");
println!("cargo:rerun-if-env-changed=TYPE_DEF_TMP_PATH"); println!("cargo:rerun-if-env-changed=TYPE_DEF_TMP_PATH");
println!("cargo:rerun-if-env-changed=CARGO_CFG_NAPI_RS_CLI_VERSION");
match std::env::var("CARGO_CFG_TARGET_OS").as_deref() { match std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
Ok("macos") => { Ok("macos") => {
macos::setup(); macos::setup();