add version info to main output
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Emil Lerch 2022-01-12 17:01:37 -08:00
parent ea93542da8
commit 9fd6755684
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -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;