diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-01 08:20:48 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-01 08:20:48 +0200 |
commit | feaa7dae8e55b0d5c18868fe298bc8ad2122860f (patch) | |
tree | b78881aec0e696ef30da0dd1f3e813cc32912fcb /CMakeLists.txt | |
parent | 355ac9296f00eac6dca51fd183f2a0b742729810 (diff) |
prettify tarball names
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
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") |