From a4e784da8399c51d5eeb5783e6a485b960d5c1f9 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Thu, 27 Mar 2025 09:20:39 +0100 Subject: doc: Don't autogenerate the README --- build.zig | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 3b88e47..eed582d 100644 --- a/build.zig +++ b/build.zig @@ -42,43 +42,11 @@ pub fn build(b: *std.Build) void { }); docs_step.dependOn(&install_docs.step); - const readme_step = b.step("readme", "Remake README."); - const readme = readMeStep(b); - readme.dependOn(example_step); - readme_step.dependOn(readme); - const all_step = b.step("all", "Build everything and runs all tests"); all_step.dependOn(test_step); all_step.dependOn(example_step); - all_step.dependOn(readme_step); b.default_step.dependOn(all_step); } -fn readMeStep(b: *std.Build) *std.Build.Step { - const s = b.allocator.create(std.Build.Step) catch unreachable; - s.* = std.Build.Step.init(.{ - .id = .custom, - .name = "ReadMeStep", - .owner = b, - .makeFn = struct { - fn make(step: *std.Build.Step, _: std.Build.Step.MakeOptions) anyerror!void { - @setEvalBranchQuota(10000); - _ = step; - const file = try std.fs.cwd().createFile("README.md", .{}); - const stream = file.writer(); - try stream.print(@embedFile("example/README.md.template"), .{ - @embedFile("example/simple.zig"), - @embedFile("example/simple-ex.zig"), - @embedFile("example/subcommands.zig"), - @embedFile("example/streaming-clap.zig"), - @embedFile("example/help.zig"), - @embedFile("example/usage.zig"), - }); - } - }.make, - }); - return s; -} - const std = @import("std"); -- cgit v1.2.3