aboutsummaryrefslogtreecommitdiff
path: root/converter/build.zig
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2024-03-04 16:24:45 +0000
committerMartin Ashby <martin@ashbysoft.com>2024-03-10 22:03:45 +0000
commite12c0d23ad72ffa9389d90311453db535f57e450 (patch)
tree00e8caf78140dee2c9af4568d7d2fb083b80b906 /converter/build.zig
parent5ed483825a50cadb1d3d2dd55f9e4ebc52716660 (diff)
downloadmfashby.net-e12c0d23ad72ffa9389d90311453db535f57e450.tar.gz
mfashby.net-e12c0d23ad72ffa9389d90311453db535f57e450.tar.bz2
mfashby.net-e12c0d23ad72ffa9389d90311453db535f57e450.tar.xz
mfashby.net-e12c0d23ad72ffa9389d90311453db535f57e450.zip
Prepare to move to zine static site generator instead of hugo
https://zine-ssg.io/documentation/
Diffstat (limited to 'converter/build.zig')
-rw-r--r--converter/build.zig36
1 files changed, 36 insertions, 0 deletions
diff --git a/converter/build.zig b/converter/build.zig
new file mode 100644
index 0000000..10f855a
--- /dev/null
+++ b/converter/build.zig
@@ -0,0 +1,36 @@
+const std = @import("std");
+
+pub fn build(b: *std.Build) void {
+ const target = b.standardTargetOptions(.{});
+ const optimize = b.standardOptimizeOption(.{});
+
+ const exe = b.addExecutable(.{
+ .name = "converter",
+ .root_source_file = .{ .path = "src/main.zig" },
+ .target = target,
+ .optimize = optimize,
+ });
+ // const zig_yaml = b.dependency("zig-yaml", .{});
+ // exe.root_module.addImport("yaml", zig_yaml.module("yaml"));
+
+ b.installArtifact(exe);
+
+ const run_cmd = b.addRunArtifact(exe);
+ run_cmd.step.dependOn(b.getInstallStep());
+
+ if (b.args) |args| {
+ run_cmd.addArgs(args);
+ }
+ const run_step = b.step("run", "Run the app");
+ run_step.dependOn(&run_cmd.step);
+
+ const exe_unit_tests = b.addTest(.{
+ .root_source_file = .{ .path = "src/main.zig" },
+ .target = target,
+ .optimize = optimize,
+ });
+
+ const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
+ const test_step = b.step("test", "Run unit tests");
+ test_step.dependOn(&run_exe_unit_tests.step);
+}