Closed scottyeager closed 1 month ago
Is there a specific reason to not use the bundled binaries in the release? I'd still clone and switch to the proper tag to build (even in a CI/CD)
Not saying there's any particularly good reason to do this--just noting that the source archives won't build as is.
I see that the build instructions specify cloning with Git, so maybe the answer is just that it's a build requirement and users should check the docs. Still, would be nice to at least present a helpful error in case someone tries to download and build these archives in the future.
maybe we handle that in docs later
Also not sure if similar approach may help https://github.com/threefoldtech/rfs/blob/master/build.rs
fn main() {
println!(
"cargo:rustc-env=GIT_VERSION={}",
git_version::git_version!(args = ["--tags", "--always", "--dirty=-modified"], fallback = "unknown")
);
}
Also not sure if similar approach may help
This did the trick :+1:
I tried building the source contained in one of the release archives (for example). It fails here in
build.rs
when running thegit_version
macro because in this case the directory is not actually a Git repo.Suggest to adding some logic to skip this or ignore the error when building without Git.