diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,4 +1,5 @@ const std = @import("std"); +const webgen = @import("webgen"); pub fn build(b: *std.Build) void { const generate_html = b.addExecutable(.{ @@ -11,12 +12,9 @@ pub fn build(b: *std.Build) void { const run_generate_html = b.addRunArtifact(generate_html); run_generate_html.setCwd(b.path("")); // make sure we always run from buildroot - b.getInstallStep().dependOn(&run_generate_html.step); - const bundle_html = b.addSystemCommand(&[_][]const u8{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); - const run_bundle_html = b.step("bundle", "Creates a tarball of the HTML output"); - bundle_html.step.dependOn(b.getInstallStep()); - run_bundle_html.dependOn(&bundle_html.step); + bundle_html.step.dependOn(&run_generate_html.step); + b.getInstallStep().dependOn(&bundle_html.step); const serve = b.addSystemCommand(&[_][]const u8{ "lighttpd", "-Df", "util/lighttpd.conf" }); const run_server = b.step("serve", "Run a local test server"); @@ -24,5 +22,7 @@ pub fn build(b: *std.Build) void { run_server.dependOn(&serve.step); const publish_to_prod = b.step("publish", "Publish the website to production"); - _ = publish_to_prod; + publish_to_prod.dependOn(b.getInstallStep()); + + b.getInstallStep().dependOn(&webgen.installHtmlStep(b).step); } |
