mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Reapply "build: Don't check parent directories for git tag"
This reverts commit 7e0c25eccd.
The `--git-dir` argument is relative to the `-C` argument, making this
patch OK after all.
I added a comment to go along with this since I found it confusing.
Apologies for the revert.
This commit is contained in:
parent
0bce4a4e05
commit
1eb729b9b9
1 changed files with 4 additions and 7 deletions
11
build.zig
11
build.zig
|
|
@ -257,13 +257,10 @@ pub fn build(b: *std.Build) !void {
|
||||||
var code: u8 = undefined;
|
var code: u8 = undefined;
|
||||||
const git_describe_untrimmed = b.runAllowFail(&[_][]const u8{
|
const git_describe_untrimmed = b.runAllowFail(&[_][]const u8{
|
||||||
"git",
|
"git",
|
||||||
"-C",
|
"-C", b.build_root.path orelse ".", // affects the --git-dir argument
|
||||||
b.build_root.path orelse ".",
|
"--git-dir", ".git", // affected by the -C argument
|
||||||
"describe",
|
"describe", "--match", "*.*.*", //
|
||||||
"--match",
|
"--tags", "--abbrev=9",
|
||||||
"*.*.*",
|
|
||||||
"--tags",
|
|
||||||
"--abbrev=9",
|
|
||||||
}, &code, .Ignore) catch {
|
}, &code, .Ignore) catch {
|
||||||
break :v version_string;
|
break :v version_string;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue