aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2021-11-02 23:54:44 +0100
committerIsaac Freund <mail@isaacfreund.com>2021-11-02 23:54:44 +0100
commit69d1453741701549ebb71acd319c49eafd674c20 (patch)
tree4e33333dcb11cdd742e8183395887dfb729cb493 /build.zig
parentd4aa64034cdaf2cf0a41c89af3b17c943b7bddb2 (diff)
downloadriver-69d1453741701549ebb71acd319c49eafd674c20.tar.gz
river-69d1453741701549ebb71acd319c49eafd674c20.tar.xz
build: fix trailing newline in version string
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index fedb940..b0c951b 100644
--- a/build.zig
+++ b/build.zig
@@ -61,7 +61,10 @@ pub fn build(b: *zbs.Builder) !void {
&ret,
.Inherit,
) catch break :blk version;
- break :blk try std.fmt.allocPrintZ(b.allocator, "{s}-{s}", .{ version, git_commit_hash });
+ break :blk try std.fmt.allocPrintZ(b.allocator, "{s}-{s}", .{
+ version,
+ mem.trim(u8, git_commit_hash, &std.ascii.spaces),
+ });
} else {
break :blk version;
}