From 8fb68746fb945585a4d56ae68ecaf9d86ba272ee Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 12 Mar 2018 21:38:46 +0100 Subject: [PATCH] configure: Get version string from git or from VERSION file (#1380) Use git to create the version string if possible. Otherwise get the version from the VERSION file. Signed-off-by: Stefan Weil --- VERSION | 1 + configure.ac | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000..a35737f9ae --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +4.0.0-beta.1 diff --git a/configure.ac b/configure.ac index c5b7e7aaf5..1c6f644ddd 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ # ---------------------------------------- AC_PREREQ([2.59]) AC_INIT([tesseract], - [4.0.0-beta.1], + [m4_esyscmd([echo -n $(test -d .git && git describe --abbrev=4 || cat VERSION)])], [https://github.com/tesseract-ocr/tesseract/issues],, [https://github.com/tesseract-ocr/tesseract/]) AC_PROG_CXX([g++ clang++])