|
@@ -161,6 +161,7 @@ pub fn build(b: *Build) !void {
|
|
const override_healed_path = b.option([]const u8, "healed-path", "Override healed path");
|
|
const override_healed_path = b.option([]const u8, "healed-path", "Override healed path");
|
|
const exno: ?usize = b.option(usize, "n", "Select exercise");
|
|
const exno: ?usize = b.option(usize, "n", "Select exercise");
|
|
const rand: ?bool = b.option(bool, "random", "Select random exercise");
|
|
const rand: ?bool = b.option(bool, "random", "Select random exercise");
|
|
|
|
+ const start: ?usize = b.option(usize, "s", "Start at exercise");
|
|
|
|
|
|
const sep = std.fs.path.sep_str;
|
|
const sep = std.fs.path.sep_str;
|
|
const healed_path = if (override_healed_path) |path|
|
|
const healed_path = if (override_healed_path) |path|
|
|
@@ -221,6 +222,26 @@ pub fn build(b: *Build) !void {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (start) |s| {
|
|
|
|
+ if (s == 0 or s > exercises.len - 1) {
|
|
|
|
+ print("unknown exercise number: {}\n", .{s});
|
|
|
|
+ std.process.exit(2);
|
|
|
|
+ }
|
|
|
|
+ const first = exercises[s - 1];
|
|
|
|
+ const ziglings_step = b.step("ziglings", b.fmt("Check ziglings starting with {s}", .{first.main_file}));
|
|
|
|
+ b.default_step = ziglings_step;
|
|
|
|
+
|
|
|
|
+ var prev_step = &header_step.step;
|
|
|
|
+ for (exercises[(s - 1)..]) |ex| {
|
|
|
|
+ const verify_stepn = ZiglingStep.create(b, ex, work_path, .normal);
|
|
|
|
+ verify_stepn.step.dependOn(prev_step);
|
|
|
|
+
|
|
|
|
+ prev_step = &verify_stepn.step;
|
|
|
|
+ }
|
|
|
|
+ ziglings_step.dependOn(prev_step);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
// Normal build mode: verifies all exercises according to the recommended
|
|
// Normal build mode: verifies all exercises according to the recommended
|
|
// order.
|
|
// order.
|
|
const ziglings_step = b.step("ziglings", "Check all ziglings");
|
|
const ziglings_step = b.step("ziglings", "Check all ziglings");
|