diff options
author | Vitaliy Ivanov <vitaliyi@interfacemasters.com> | 2020-10-29 00:13:19 +0200 |
---|---|---|
committer | Alfredo Cardigliano <alfredo.cardigliano@gmail.com> | 2020-10-29 12:35:05 +0100 |
commit | 10506b5173f32680cf886da96131968e6fb9d939 (patch) | |
tree | 1da9f09c151b0cc750cb9e4da8717130c59f3ccb | |
parent | 94471193c2082194e5be5a5096eef1784fc16b28 (diff) |
Generate NDPI_API_VERSION based on git commands.
https://github.com/ntop/PF_RING/issues/668
Check for .git directory works in case of usual clone of nDPI repo.
But if you integrate is as submodule then .git is a file.
Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>
-rw-r--r-- | configure.seed | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.seed b/configure.seed index 9303e3187..535823271 100644 --- a/configure.seed +++ b/configure.seed @@ -46,7 +46,9 @@ AC_DEFINE_UNQUOTED(NDPI_MAJOR_RELEASE, "${NDPI_MAJOR}", [nDPI major release]) AC_DEFINE_UNQUOTED(NDPI_MINOR_RELEASE, "${NDPI_MINOR}", [nDPI minor release]) AC_DEFINE_UNQUOTED(NDPI_PATCH_LEVEL, "${NDPI_PATCH}", [nDPI patch level]) -if test -d ".git"; then : +# .git as directory in a cloned repo +# .git as file in submodule based integration +if test -d ".git" || test -f ".git" ; then : GIT_TAG=`git log -1 --format=%h` GIT_DATE=`git log -1 --format=%cd` # |