zed/crates/zed2
Max Brunsfeld b3e1514b00
Avoid caching zed build script if git state has changed (#3610)
@as-cii and @SomeoneToIgnore noticed a bug where Zed nightly would
continuously report that an update was available. This nightly
auto-update logic depends on the `ZED_COMMIT_SHA` constant, which is
compiled into the app via an rustc environment variable that is assigned
in the `zed2` build script.

I think the bug was caused by the `zed2` build script's output being
cached on our CI, when building the nightly app bundle. The result was
that the `publish-nightly` action updated the "current SHA" for nightly,
but uploaded an artifact whose `ZED_COMMIT_SHA` was cached from an
earlier version.

I've added a line to the `build.rs` that triggers a rerun if the
`.git/logs/HEAD` file has been changed. I think this should prevent the
unwanted caching.
2023-12-12 10:27:57 -08:00
..
contents
resources
src
build.rs
Cargo.toml