From ca42ba75a5dd7dff69c6cd802271d54c8309c5f3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 19 Nov 2010 11:32:11 -0800 Subject: uhd: new versioning scheme with API compat number --- host/config/Version.cmake | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'host/config/Version.cmake') diff --git a/host/config/Version.cmake b/host/config/Version.cmake index 9e4b6b306..214002b7b 100644 --- a/host/config/Version.cmake +++ b/host/config/Version.cmake @@ -18,9 +18,9 @@ ######################################################################## # Setup Version Numbers ######################################################################## -SET(UHD_VERSION_MAJOR 0) -SET(UHD_VERSION_MINOR 0) -SET(UHD_VERSION_PATCH 0) +SET(UHD_VERSION_MAJOR 0001) #API compatibility number +SET(UHD_VERSION_MINOR 0) #Timestamp of git commit +SET(UHD_VERSION_PATCH 0) #Short hash of git commit ######################################################################## # Find GIT to get repo information @@ -46,19 +46,12 @@ ELSE(${GIT} STREQUAL "GIT-NOTFOUND") OUTPUT_VARIABLE _git_timestamp OUTPUT_STRIP_TRAILING_WHITESPACE ) - #format the timestamp into YYYY-MM-DD + #format the timestamp into YYYY-MM-DD-HH-MM-SS EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d', time.gmtime(${_git_timestamp}))" + COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d%H%M%S', time.gmtime(${_git_timestamp}))" OUTPUT_VARIABLE _git_date OUTPUT_STRIP_TRAILING_WHITESPACE ) - SET(UHD_VERSION_MAJOR ${_git_date}) - - #format the timestamp into HH-MM-SS - EXECUTE_PROCESS( - COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%H%M%S', time.gmtime(${_git_timestamp}))" - OUTPUT_VARIABLE _git_time OUTPUT_STRIP_TRAILING_WHITESPACE - ) - SET(UHD_VERSION_MINOR ${_git_time}) + SET(UHD_VERSION_MINOR ${_git_date}) #grab the git ref id for the current head EXECUTE_PROCESS( -- cgit v1.2.3