baoyachi / shadow-rs

A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
https://docs.rs/shadow-rs
MIT License
450 stars 41 forks source link

Rebuild on changes to `SOURCE_DATE_EPOCH` #65

Closed lopopolo closed 3 years ago

lopopolo commented 3 years ago

Cargo supports some pragmas to force rebuilds if non-Rust sources become "dirtied".

This PR forces cargo to rebuild if the SOURCE_DATE_EPOCH env variable changes since it will change how now_data_time and things derived from it are computed.

https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorerun-if-env-changedname

baoyachi commented 3 years ago

Thx.