Skip to content

Commit

Permalink
Include Git SHA in version output when no tags available
Browse files Browse the repository at this point in the history
Fixes #813
  • Loading branch information
nickg committed Dec 16, 2023
1 parent 2025713 commit 92d426a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ nodist_EXTRA_bin_nvc_SOURCES += gitsha.h
CLEANFILES += gitsha.h
BUILT_SOURCES += gitsha.h

GIT_SHA_CMD = git describe --long | sed 's/^r\(.*\)/\1/; s/\([^-]*-g\)/r\1/;s/-/./g'
GIT_SHA_CMD = git describe --always --long | sed 's/^r\(.*\)/\1/; s/\([^-]*-g\)/r\1/;s/-/./g'

gitsha.h: .git/logs/HEAD
$(AM_V_GEN)echo "#define GIT_SHA \"$$(GIT_DIR=$(top_srcdir)/.git $(GIT_SHA_CMD))\"" > gitsha.h
Expand Down

0 comments on commit 92d426a

Please sign in to comment.