Skip to content

Commit

Permalink
Avoid debian tags when generating gitrev.h
Browse files Browse the repository at this point in the history
As suggested by George Rawlinson.
closes #46
  • Loading branch information
anse1 committed Jan 21, 2022
1 parent 0547f1e commit 91adda2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ configure_file(config_h.cmake.in config.h)
# get our git tag
set(GIT_TAG UNRELEASED)
execute_process(
COMMAND git describe --dirty --tags --always
COMMAND git describe --exclude=debian* --dirty --tags --always
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
OUTPUT_VARIABLE GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ EXTRA_DIST = gitrev.h dump.hh expr.hh grammar.hh log.hh prod.hh \
dut.hh postgres.hh monetdb.hh log-v1.0-to-v1.2.sql boring_sqlstates.txt

gitrev.h: $(HEADERS) $(SOURCES)
-if git describe --dirty --tags --always > /dev/null ; then \
echo "#define GITREV \"$$(git describe --dirty --tags --always)\"" > $@ ;\
-if git describe --exclude='debian*' --dirty --tags --always > /dev/null ; then \
echo "#define GITREV \"$$(git describe --exclude='debian*' --dirty --tags --always)\"" > $@ ;\
else \
echo "#define GITREV \"unreleased\"" > $@ ;\
fi
Expand Down

0 comments on commit 91adda2

Please sign in to comment.