summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-19 11:32:11 -0800
committerJosh Blum <josh@joshknows.com>2010-11-19 11:32:11 -0800
commit5b22c2b9073bab6ead999c9f6175c629ab68bdec (patch)
tree1b94ebc823deb7eb4932247bce8817196d079505
parentdd03a2a0dff2d34e7ffca95531eaa42c85fd756c (diff)
downloaduhd-5b22c2b9073bab6ead999c9f6175c629ab68bdec.tar.gz
uhd-5b22c2b9073bab6ead999c9f6175c629ab68bdec.tar.bz2
uhd-5b22c2b9073bab6ead999c9f6175c629ab68bdec.zip
uhd: new versioning scheme with API compat number
-rw-r--r--host/config/Version.cmake19
1 files changed, 6 insertions, 13 deletions
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(