Skip to content

Commit

Permalink
minor update, to always include version, even if not build from git
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandros committed Apr 6, 2016
1 parent 76be318 commit af3ef73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ALL_CFLAGS := $(CFLAGS)
ALL_CFLAGS += -Wall -Wextra -pedantic -ansi
ALL_CFLAGS += -fno-strict-aliasing
ALL_CFLAGS += -Wuninitialized -Winit-self -Wfloat-equal
ALL_CFLAGS += -Wundef -Wshadow -Wc++-compat -Wcast-qual -Wcast-align
ALL_CFLAGS += -Wshadow -Wc++-compat -Wcast-qual -Wcast-align
ALL_CFLAGS += -Wconversion -Wsign-conversion -Wjump-misses-init
ALL_CFLAGS += -Wno-multichar -Wpacked -Wstrict-overflow -Wvla
ALL_CFLAGS += -Wformat -Wno-format-zero-length -Wstrict-prototypes
Expand Down
3 changes: 2 additions & 1 deletion src/tldr.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <pwd.h>
#include <time.h>

#define VERSION_TAG "v1.2.0"
#ifndef VERSION
#define VERSION_PRETTY "Version Unknown"
#else
Expand Down Expand Up @@ -521,7 +522,7 @@ void
print_version(char const* arg)
{
/* *INDENT-OFF* */
fprintf(stdout, "%s %s\n", arg, VERSION_PRETTY);
fprintf(stdout, "%s %s (%s)\n", arg, VERSION_TAG, VERSION_PRETTY);
fprintf(stdout, "Copyright (C) 2016 Arvid Gerstmann\n");
fprintf(stdout, "Source available at https://github.com/tldr-pages/tldr-cpp-client\n");
/* *INDENT-ON* */
Expand Down

0 comments on commit af3ef73

Please sign in to comment.