| ... | ... | @@ -10,8 +10,7 @@ pub fn build(b: *Builder) void { |
| 10 | 10 | |
| 11 | 11 | const use_full_name = b.option(bool, "use-full-name", "") orelse false; |
| 12 | 12 | const with_arch_os = b.fmt("-{}-{}", .{@tagName(target.cpu_arch orelse builtin.arch), @tagName(target.os_tag orelse builtin.os.tag)}); |
| 13 | | const version_tag = if (b.option([]const u8, "tag", "")) |vt| b.fmt("-{}", .{vt}) else ""; |
| 14 | | const exe_name = b.fmt("{}{}{}", .{ "zigmod", version_tag, if (use_full_name) with_arch_os else "" }); |
| 13 | const exe_name = b.fmt("{}{}", .{ "zigmod", if (use_full_name) with_arch_os else "" }); |
| 15 | 14 | |
| 16 | 15 | const exe = b.addExecutable(exe_name, "src/main.zig"); |
| 17 | 16 | exe.setTarget(target); |
| ... | ... | @@ -19,6 +18,7 @@ pub fn build(b: *Builder) void { |
| 19 | 18 | if (mode != .Debug) { |
| 20 | 19 | exe.strip = true; |
| 21 | 20 | } |
| 21 | exe.addBuildOption([]const u8, "version", b.option([]const u8, "tag", "") orelse ""); |
| 22 | 22 | |
| 23 | 23 | exe.linkLibC(); |
| 24 | 24 | |