Commit cd0fe5e4 authored by partyd's avatar partyd
Browse files

ENH: Change package versioning to list the date instead of svn revision.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16159 3bd1e089-480b-0410-8dfb-8563597acbee
parent be63e052
......@@ -265,10 +265,25 @@ SET(Slicer_VERSION_MINOR "0")
IF(NOT Slicer_VERSION_PATCH)
SET(Slicer_VERSION_PATCH "gamma")
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn)
Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer)
SET(Slicer_VERSION_PATCH "gamma-r${Slicer_WC_REVISION}")
ENDIF()
IF(WIN32)
EXECUTE_PROCESS(COMMAND cmd /c "date /T"
RESULT_VARIABLE getdate_result
OUTPUT_VARIABLE date
ERROR_VARIABLE date
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE ".*(..)/(..)/(....)" "\\3-\\1-\\2" date ${date})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND date "+%Y-%m-%d"
RESULT_VARIABLE getdate_result
OUTPUT_VARIABLE date
ERROR_VARIABLE date
OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE()
SET(${date} 000000)
ENDIF (WIN32)
SET(Slicer_VERSION_PATCH "gamma-${date}")
ENDIF()
......
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