mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Sanitize branch name so branches with a slash in its name do not break (Fixes: #521)
This commit is contained in:
parent
4004169f6d
commit
ad5ebaa813
@ -41,6 +41,8 @@ if(GIT_FOUND)
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
# Sanitize branch name
|
||||||
|
string(REGEX REPLACE "[#!?&|\/^$%*]" "_" GIT_BRANCH "${GIT_BRANCH}")
|
||||||
set(VOLK_GNSSSDR_GIT_BRANCH "${GIT_BRANCH}")
|
set(VOLK_GNSSSDR_GIT_BRANCH "${GIT_BRANCH}")
|
||||||
set(VOLK_GNSSSDR_GIT_HASH "${GIT_COMMIT_HASH}")
|
set(VOLK_GNSSSDR_GIT_HASH "${GIT_COMMIT_HASH}")
|
||||||
else()
|
else()
|
||||||
@ -51,6 +53,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(GIT_BRANCH)
|
if(GIT_BRANCH)
|
||||||
|
# Sanitize branch name
|
||||||
|
string(REGEX REPLACE "[#!?&|\/^$%*]" "_" GIT_BRANCH "${GIT_BRANCH}")
|
||||||
set(VOLK_GNSSSDR_GIT_BRANCH "${GIT_BRANCH}")
|
set(VOLK_GNSSSDR_GIT_BRANCH "${GIT_BRANCH}")
|
||||||
else()
|
else()
|
||||||
set(VOLK_GNSSSDR_GIT_BRANCH "unknown")
|
set(VOLK_GNSSSDR_GIT_BRANCH "unknown")
|
||||||
|
Loading…
Reference in New Issue
Block a user