Allow builds without a Git checkout #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding:
zig buildunconditionally shells out togit rev-parse HEADto produce the CLI version.Problem:
build.zigrunsb.run(&.{ "git", "rev-parse", "HEAD" })during build graph construction.gitfail before compiling.Impact:
Packaging and reproducible builds are more brittle than necessary; the code cannot be built from a plain source snapshot without extra VCS context.
Suggested fix:
Add an explicit
-Dversion=build option, use the git hash only as a best-effort default when.gitandgitare available, and fall back tounknownor a release-provided version string.Relevant code:
build.zig: version option generation around line 60.