Skip to content

Commit 21620f3

Browse files
selfisekailinusg
authored andcommitted
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 parent 3b3c189 commit 21620f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
"*.*.*",

0 commit comments

Comments
 (0)