Skip to content

Commit 977a7e3

Browse files
committed
change version.cmake to check all tags
Fix issue iovisor#2666 Currently, in master where latest tag is v0.12.0, the build still says is it v0.11.0. [ben@centos bcc]$ cd build/ [ben@centos build]$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -- Latest recognized Git tag is v0.11.0 The reason is the git_describe by default only checks annotated tag while tag v0.12.0 is tagged through github release process which just tags whatever the top of the master. Making git_describe to check all tags fixed the issue. Signed-off-by: Yonghong Song <[email protected]>
1 parent 8bb4e47 commit 977a7e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/version.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if(NOT REVISION)
44
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
55
string(SUBSTRING "${GIT_SHA1}" 0 8 GIT_SHA1_SHORT)
66
git_describe(GIT_DESCRIPTION)
7-
git_describe(GIT_TAG_LAST "--abbrev=0")
7+
git_describe(GIT_TAG_LAST "--abbrev=0" "--tags")
88
git_get_exact_tag(GIT_TAG_EXACT)
99
string(SUBSTRING "${GIT_TAG_LAST}-${GIT_SHA1_SHORT}" 1 -1 REVISION)
1010
if(GIT_TAG_EXACT)

0 commit comments

Comments
 (0)