authorgravatar for lauren@selfisekai.rocksLN Liberda <lauren@selfisekai.rocks> 2025-03-07 18:20:46+01:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-03-08 17:54:50+00:00
log21620f3c652bc874776acc7251f05b25d2838019
tree0bc0e3aed364d4ec749233c80c06b267495ed9c9
parent3b3c18909d5f745f607ead203f67d42d13f200d5

build: Don't check parent directories for git tag

Sometimes Zig is built not from a git repository (e.g. from tarball), but inside another git repository (e.g. distro package repository). Make sure that the version check tries to parse a tag of Zig, and not of a parent directory.

1 files changed, 2 insertions(+), 0 deletions(-)

build.zig+2
......@@ -259,6 +259,8 @@ pub fn build(b: *std.Build) !void {
259259 "git",
260260 "-C",
261261 b.build_root.path orelse ".",
262 "--git-dir",
263 ".git",
262264 "describe",
263265 "--match",
264266 "*.*.*",