mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-16 15:51:55 +00:00
fix(cmake): properly exclude prereleases when fetching latest tag from cmake.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
577bccabd0
commit
9c483adafa
@ -91,15 +91,16 @@ function(git_get_latest_tag _var)
|
|||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# We use git describe --tags `git rev-list --tags --max-count=1`
|
# We use git describe --tags `git rev-list --exclude "*.*.*-*" --tags --max-count=1`
|
||||||
|
# Note how we eclude prereleases tags (the ones with "-alphaX")
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
"${GIT_EXECUTABLE}"
|
"${GIT_EXECUTABLE}"
|
||||||
rev-list
|
rev-list
|
||||||
|
--exclude "*.*.*-*"
|
||||||
--tags
|
--tags
|
||||||
--max-count=1
|
--max-count=1
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
COMMAND tail -n1
|
|
||||||
RESULT_VARIABLE
|
RESULT_VARIABLE
|
||||||
res
|
res
|
||||||
OUTPUT_VARIABLE
|
OUTPUT_VARIABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user