mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-24 22:02:19 +00:00
fix(cmake): properly check that git describe
returns a real tag (semversioned).
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
d5907f612c
commit
01ae266332
@ -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$")
|
||||
|
Loading…
Reference in New Issue
Block a user