diff options
| author | Rosa <rosaontheweb@proton.me> | 2026-06-15 15:42:25 -0400 |
|---|---|---|
| committer | Rosa <rosaontheweb@proton.me> | 2026-06-15 15:42:25 -0400 |
| commit | 0305c874bbc10c549ba719491c42c97225b19eeb (patch) | |
| tree | 2698993d51f78e5cd7f48c7b1a451c38fa1c8432 /build.zig | |
| parent | 600e21fa5c4e232f135b7728b111f6268f95a71f (diff) | |
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -2,24 +2,10 @@ const std = @import("std"); const webgen = @import("webgen"); pub fn build(b: *std.Build) void { - const optimize = b.standardOptimizeOption(.{}); - const target = b.standardTargetOptions(.{}); - const run_webgen = webgen.installHtmlStep(b); run_webgen.addDirectoryArg(b.path("src")); - const cgi_app = b.addExecutable(.{ - .name = "submit.cgi", - .root_module = b.createModule(.{ - .optimize = optimize, - .root_source_file = b.path("src/cgi/submit.zig"), - .target = target, - }), - }); - b.installArtifact(cgi_app); - const run_cgi = b.step("run_cgi", "Run the CGI application"); - run_cgi.dependOn(&b.addRunArtifact(cgi_app).step); - const bundle_html = b.addSystemCommand(&.{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out", "zig-out" }); + const bundle_html = b.addSystemCommand(&.{ "tar", "--exclude=pages.tar.gz", "-czvf", "html-out/pages.tar.gz", "html-out" }); bundle_html.step.dependOn(&run_webgen.step); b.getInstallStep().dependOn(&bundle_html.step); @@ -39,7 +25,7 @@ pub fn build(b: *std.Build) void { unpack_bundle.step.dependOn(©_bundle.step); publish_to_prod.dependOn(&unpack_bundle.step); - const clean_html = b.addSystemCommand(&.{"rm", "-r"}); + const clean_html = b.addSystemCommand(&.{"rm", "-rf"}); clean_html.addFileArg(b.path("html-out")); clean_html.addFileArg(b.path("zig-out")); b.getUninstallStep().dependOn(&clean_html.step); |
