Commit 6a4850e5 authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

make sure regex read all the way to the end of line (#3531)

parent 0c0b5105
......@@ -43,10 +43,10 @@ function(NGRAPH_GET_TAG_OF_CURRENT_HASH)
if (NOT ${TAG_LIST} STREQUAL "")
# first look for vX.Y.Z release tag
string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)" TAG ${TAG_LIST})
string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)$" TAG ${TAG_LIST})
if ("${TAG}" STREQUAL "")
# release tag not found so now look for vX.Y.Z-rc.N tag
string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)-(rc\\.[0-9?]+)" TAG ${TAG_LIST})
string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)-(rc\\.[0-9?]+)$" TAG ${TAG_LIST})
endif()
set(STATUS ${TAG})
if (NOT "${TAG}" STREQUAL "")
......@@ -79,6 +79,7 @@ function(NGRAPH_GET_VERSION_LABEL)
if ("${NGRAPH_CURRENT_RELEASE_TAG}" STREQUAL "")
NGRAPH_GET_CURRENT_HASH()
NGRAPH_GET_MOST_RECENT_TAG()
message(STATUS "Current hash ${NGRAPH_CURRENT_HASH}")
string(SUBSTRING "${NGRAPH_CURRENT_HASH}" 0 7 HASH)
if (NOT ${NGRAPH_MOST_RECENT_RELEASE_TAG} STREQUAL "")
set(NGRAPH_VERSION_LABEL "${NGRAPH_MOST_RECENT_RELEASE_TAG}+${HASH}" PARENT_SCOPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment