Skip to content

Commit af3ef73

Browse files
committed
minor update, to always include version, even if not build from git
1 parent 76be318 commit af3ef73

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ALL_CFLAGS := $(CFLAGS)
2727
ALL_CFLAGS += -Wall -Wextra -pedantic -ansi
2828
ALL_CFLAGS += -fno-strict-aliasing
2929
ALL_CFLAGS += -Wuninitialized -Winit-self -Wfloat-equal
30-
ALL_CFLAGS += -Wundef -Wshadow -Wc++-compat -Wcast-qual -Wcast-align
30+
ALL_CFLAGS += -Wshadow -Wc++-compat -Wcast-qual -Wcast-align
3131
ALL_CFLAGS += -Wconversion -Wsign-conversion -Wjump-misses-init
3232
ALL_CFLAGS += -Wno-multichar -Wpacked -Wstrict-overflow -Wvla
3333
ALL_CFLAGS += -Wformat -Wno-format-zero-length -Wstrict-prototypes

src/tldr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <pwd.h>
1919
#include <time.h>
2020

21+
#define VERSION_TAG "v1.2.0"
2122
#ifndef VERSION
2223
#define VERSION_PRETTY "Version Unknown"
2324
#else
@@ -521,7 +522,7 @@ void
521522
print_version(char const* arg)
522523
{
523524
/* *INDENT-OFF* */
524-
fprintf(stdout, "%s %s\n", arg, VERSION_PRETTY);
525+
fprintf(stdout, "%s %s (%s)\n", arg, VERSION_TAG, VERSION_PRETTY);
525526
fprintf(stdout, "Copyright (C) 2016 Arvid Gerstmann\n");
526527
fprintf(stdout, "Source available at https://github.com/tldr-pages/tldr-cpp-client\n");
527528
/* *INDENT-ON* */

0 commit comments

Comments
 (0)