Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Remove vestigial invocation of git rev-parse (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnite authored Aug 6, 2023
1 parent 3346363 commit 20b7444
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@ pub fn build(b: *std.build.Builder) !void {
.optimize = optimize,
});

const rev_parse = b.addSystemCommand(&.{ "git", "rev-parse", "HEAD" });
const commit = rev_parse.captureStdOut();

const build_options = b.addOptions();
build_options.addOptionPath("commit", commit);

const regz = b.addExecutable(.{
.name = "regz",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
regz.addOptions("build_options", build_options);
regz.addModule("clap", clap_dep.module("clap"));
regz.linkLibrary(libxml2_dep.artifact("xml2"));
b.installArtifact(regz);
Expand Down Expand Up @@ -79,7 +72,6 @@ pub fn build(b: *std.build.Builder) !void {
.target = target,
.optimize = optimize,
});
tests.addOptions("build_options", build_options);
tests.linkLibrary(libxml2_dep.artifact("xml2"));
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&tests.step);
Expand Down

0 comments on commit 20b7444

Please sign in to comment.