summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-01 08:20:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-01 08:20:48 +0200
commitfeaa7dae8e55b0d5c18868fe298bc8ad2122860f (patch)
treeb78881aec0e696ef30da0dd1f3e813cc32912fcb
parent355ac9296f00eac6dca51fd183f2a0b742729810 (diff)
prettify tarball names
-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")