summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18486080..1ceffd54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -501,7 +501,13 @@ endif()
string(TIMESTAMP filename-date "%Y%m%d")
set(filename-ostype ${CMAKE_SYSTEM_NAME})
-set(filename_0 opentrack-build-${filename-ostype}-${filename-date})
+get_git_head_revision(filename-branch_0 filename-hash_0)
+if(filename-hash_0)
+ string(SUBSTRING "${filename-hash_0}" 0 7 filename-hash)
+endif()
+string(REPLACE "refs/heads/" "" filename-branch_1 "${filename-branch_0}")
+string(REPLACE "/" "-" filename-branch "${filename-branch_1}")
+set(filename_0 opentrack-${filename-ostype}-${filename-branch}-${filename-date}-${filename-hash})
string(TOLOWER "${filename_0}" filename_1)
set(filename "${CMAKE_BINARY_DIR}/${filename_1}.tar.xz")