mirror of
https://github.com/falcosecurity/falco.git
synced 2026-04-02 10:02:12 +00:00
Compare commits
2 Commits
ekoops-pat
...
0.34.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fc6153160 | ||
|
|
b3f009ad4c |
@@ -19,6 +19,10 @@ if(NOT FALCO_VERSION)
|
|||||||
# Try to obtain the exact git tag
|
# Try to obtain the exact git tag
|
||||||
git_get_exact_tag(FALCO_TAG)
|
git_get_exact_tag(FALCO_TAG)
|
||||||
if(NOT FALCO_TAG)
|
if(NOT FALCO_TAG)
|
||||||
|
# Obtain the closest tag
|
||||||
|
git_describe(FALCO_VERSION "--always" "--tags" "--abbrev=7")
|
||||||
|
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
|
# Fetch current hash
|
||||||
get_git_head_revision(refspec FALCO_HASH)
|
get_git_head_revision(refspec FALCO_HASH)
|
||||||
if(NOT FALCO_HASH OR FALCO_HASH MATCHES "NOTFOUND$")
|
if(NOT FALCO_HASH OR FALCO_HASH MATCHES "NOTFOUND$")
|
||||||
@@ -42,6 +46,9 @@ if(NOT FALCO_VERSION)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
# Format FALCO_VERSION to be semver with prerelease and build part
|
||||||
|
string(REPLACE "-g" "+" FALCO_VERSION "${FALCO_VERSION}")
|
||||||
else()
|
else()
|
||||||
# A tag has been found: use it as the Falco version
|
# A tag has been found: use it as the Falco version
|
||||||
set(FALCO_VERSION "${FALCO_TAG}")
|
set(FALCO_VERSION "${FALCO_TAG}")
|
||||||
|
|||||||
Reference in New Issue
Block a user