Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
build: add -Dversion-string option
Distros may not have git available when packaging river. However,
they should be able to provide detailed version information from an
alternative source such as Debian's dpkg-parsechangelog.
build.zig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build.zig b/build.zig
index fd77470..9398928 100644
--- a/build.zig
+++ b/build.zig
@@ -43,7 +43,9 @@ pub fn build(b: *Build) !void {
) orelse false;
const full_version = blk: {
- if (mem.endsWith(u8, version, "-dev")) {
+ if (b.option([]const u8, "version-string", "Override `river -version` output.")) |version_override| {
+ break :blk version_override;
+ } else if (mem.endsWith(u8, version, "-dev")) {
var ret: u8 = undefined;
const git_describe_long = b.runAllowFail(