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 { |
| 259 | 259 | "git", |
| 260 | 260 | "-C", |
| 261 | 261 | b.build_root.path orelse ".", |
| 262 | "--git-dir", |
| 263 | ".git", |
| 262 | 264 | "describe", |
| 263 | 265 | "--match", |
| 264 | 266 | "*.*.*", |