| author | |
| committer | |
| log | 21620f3c652bc874776acc7251f05b25d2838019 |
| tree | 0bc0e3aed364d4ec749233c80c06b267495ed9c9 |
| parent | 3b3c18909d5f745f607ead203f67d42d13f200d5 |
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,6 +259,8 @@ pub fn build(b: *std.Build) !void { |
| 259 | "git", | 259 | "git", |
| 260 | "-C", | 260 | "-C", |
| 261 | b.build_root.path orelse ".", | 261 | b.build_root.path orelse ".", |
| 262 | "--git-dir", | ||
| 263 | ".git", | ||
| 262 | "describe", | 264 | "describe", |
| 263 | "--match", | 265 | "--match", |
| 264 | "*.*.*", | 266 | "*.*.*", |