-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.zig
36 lines (29 loc) · 1.02 KB
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const std = @import("std");
pub fn build(b: *std.build.Builder) !void {
const verifier = b.addExecutable(.{
.name = "verifier",
.root_source_file = .{ .path = "tools/verifier.zig" },
});
const adder = b.addExecutable(.{
.name = "adder",
.root_source_file = .{ .path = "tools/adder.zig" },
});
const verify = verifier.run();
const add = adder.run();
const verify_step = b.step("verify", "Verifies if the repository structure is sane and valid.");
verify_step.dependOn(&verify.step);
const add_step = b.step("add", "Adds a new package");
add_step.dependOn(&add.step);
try buildToolsFixer(b);
}
fn buildToolsFixer(b: *std.build.Builder) !void {
const exe = b.addExecutable(.{
.name = "fix",
.root_source_file = .{ .path = "tools/fixer.zig" },
});
exe.linkSystemLibrary("libcurl");
exe.linkLibC();
const run_cmd = exe.run();
const run_step = b.step("fix", "Fix GitHub package metadata");
run_step.dependOn(&run_cmd.step);
}