Skip to content

Commit

Permalink
fix(cmake): properly check that git describe returns a real tag (se…
Browse files Browse the repository at this point in the history
…mversioned).

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Feb 7, 2023
1 parent b3f009a commit 4fc6153
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/modules/GetFalcoVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ if(NOT FALCO_VERSION)
if(NOT FALCO_TAG)
# Obtain the closest tag
git_describe(FALCO_VERSION "--always" "--tags" "--abbrev=7")
if(FALCO_VERSION MATCHES "NOTFOUND$")
string(REGEX MATCH "^[0-9]+.[0-9]+.[0-9]+$" FALCO_TAG ${FALCO_VERSION})
if(FALCO_VERSION MATCHES "NOTFOUND$" OR FALCO_TAG STREQUAL "")
# Fetch current hash
get_git_head_revision(refspec FALCO_HASH)
if(NOT FALCO_HASH OR FALCO_HASH MATCHES "NOTFOUND$")
Expand Down

0 comments on commit 4fc6153

Please sign in to comment.