diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -2,18 +2,10 @@ const std = @import("std"); const webgen = @import("webgen"); pub fn build(b: *std.Build) void { - const generate_html = b.addExecutable(.{ - .name = "generate_html", - .root_module = b.createModule(.{ - .root_source_file = b.path("util/generate_html.zig"), - .target = b.graph.host, - }), - }); - - const run_generate_html = b.addRunArtifact(generate_html); - run_generate_html.setCwd(b.path("")); // make sure we always run from buildroot + const run_webgen = webgen.installHtmlStep(b); + run_webgen.addDirectoryArg(b.path("src")); const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); - bundle_html.step.dependOn(&run_generate_html.step); + bundle_html.step.dependOn(&run_webgen.step); b.getInstallStep().dependOn(&bundle_html.step); const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" }); @@ -23,6 +15,4 @@ pub fn build(b: *std.Build) void { const publish_to_prod = b.step("publish", "Publish the website to production"); publish_to_prod.dependOn(b.getInstallStep()); - - b.getInstallStep().dependOn(&webgen.installHtmlStep(b).step); } |
