From dd09af34b791def2ef370232922d968f5176d1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Fri, 12 Aug 2022 21:16:37 +0200 Subject: Make binaries say what git commit they come from The manual skipping of the initial "v" from tag names is unfortunate, but still a bit better than further cluttering up the build system. --- fiv-jpegcrop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fiv-jpegcrop.c') diff --git a/fiv-jpegcrop.c b/fiv-jpegcrop.c index fad0c22..f19ff74 100644 --- a/fiv-jpegcrop.c +++ b/fiv-jpegcrop.c @@ -397,7 +397,8 @@ main(int argc, char *argv[]) gboolean initialized = gtk_init_with_args( &argc, &argv, " - Lossless JPEG cropper", options, NULL, &error); if (show_version) { - printf("fiv-jpegcrop " PROJECT_VERSION "\n"); + const char *version = PROJECT_VERSION; + printf("%s %s\n", "fiv-jpegcrop", &version[*version == 'v']); return 0; } if (!initialized) -- cgit v1.2.3