From 9fd6755684c6d5232811026cf7fc248cd6952309 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 12 Jan 2022 17:01:37 -0800 Subject: [PATCH] add version info to main output --- src/main.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.zig b/src/main.zig index 343f8f4..bda6a81 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,6 +1,7 @@ const std = @import("std"); const aws = @import("aws.zig"); const json = @import("json.zig"); +const version = @import("git_version.zig"); var verbose = false; @@ -43,9 +44,13 @@ pub fn main() anyerror!void { var tests = std.ArrayList(Tests).init(allocator); defer tests.deinit(); var args = std.process.args(); + var first = true; while (args.next(allocator)) |arg_or_error| { const arg = try arg_or_error; defer allocator.free(arg); + if (first) + std.log.info("{s} {s}", .{ arg, version.pretty_version }); + first = false; if (std.mem.eql(u8, "-v", arg)) { verbose = true; continue;