dump rev and hash in a file to be packed by cpack
authorkoda
Mon, 04 Mar 2013 13:30:33 +0100
changeset 8641 f3aa0d48a600
parent 8640 75d42abc9375
child 8642 d7062e684466
dump rev and hash in a file to be packed by cpack
.hgignore
CMakeLists.txt
--- a/.hgignore	Mon Mar 04 13:29:59 2013 +0100
+++ b/.hgignore	Mon Mar 04 13:30:33 2013 +0100
@@ -61,3 +61,5 @@
 glob:share/hedgewars/Data/misc/hwengine.desktop
 glob:*.exe
 glob:_CPack_Packages/
+glob:version_info.txt
+glob:*.tar.*
--- a/CMakeLists.txt	Mon Mar 04 13:29:59 2013 +0100
+++ b/CMakeLists.txt	Mon Mar 04 13:30:33 2013 +0100
@@ -57,6 +57,8 @@
     endif()
     #let's assume that if you have hg you might be interested in debugging
     set(default_build_type "DEBUG")
+    #write down hash and rev for easy picking should hg be missing
+    file(WRITE "${CMAKE_SOURCE_DIR}/share/version_info.txt" "Hedgewars versioning information, do not modify\nrev ${revision_number}\nhash ${hash_number}\n")
 else()
     set(default_build_type "RELEASE")
     # TODO think of a better fallback when hg not found