Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Avoid caching zed build script if git state has changed

Max Brunsfelde3ed3b8c1c56
diff --git a/crates/zed2/build.rs b/crates/zed2/build.rs
index 101838b8af0..08608d0c6a0 100644
--- a/crates/zed2/build.rs
+++ b/crates/zed2/build.rs
@@ -3,10 +3,7 @@ use std::process::Command;
fn main() {
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
- if let Ok(value) = std::env::var("ZED_PREVIEW_CHANNEL") {
- println!("cargo:rustc-env=ZED_PREVIEW_CHANNEL={value}");
- }
-
+ println!("cargo:rerun-if-env-changed=ZED_BUNDLE");
if std::env::var("ZED_BUNDLE").ok().as_deref() == Some("true") {
// Find WebRTC.framework in the Frameworks folder when running as part of an application bundle.
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/../Frameworks");
@@ -25,6 +22,7 @@ fn main() {
println!("cargo:rustc-link-arg=-Wl,-ObjC");
// Populate git sha environment variable if git is available
+ println!("cargo:rerun-if-changed=.git/logs/HEAD");
if let Ok(output) = Command::new("git").args(["rev-parse", "HEAD"]).output() {
if output.status.success() {
let git_sha = String::from_utf8_lossy(&output.stdout);