This one is tricky and I am not sure if it is really possible:
I have a git repository that contains a workspace of multiple binary crates and a library crate. The library has a build.rs script that determines the git version from git describe
and fills an environment variable. The library also has a get_version()
function that just returns the &'static str
returned by env!()
.
Now this does not always work correctly, because the git describe string sometimes changes without the library being rebuilt. What would be the correct way to achieve what I am trying to do? I just want a static version string that is always updated, when the git describe
output changes.