From ca52633557bf07ce5ab228e99b543756d7905446 Mon Sep 17 00:00:00 2001 From: Loris Cro Date: Fri, 26 Jul 2024 12:38:17 +0200 Subject: [PATCH] add ability to specify version manually --- build.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index b97fa04..ccf841d 100644 --- a/build.zig +++ b/build.zig @@ -5,7 +5,11 @@ pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const version = getVersion(b); + const version: Version = if (b.option( + []const u8, + "force-version", + "When building the SuperHTML CLI tool force a specific version, bypassing 'git describe'", + )) |v| .{ .commit = v } else getVersion(b); const scripty = b.dependency("scripty", .{}); const superhtml = b.addModule("superhtml", .{