summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-06-30 13:20:13 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-06-30 13:20:13 +0000
commit7811297f0ad86acaad0477096dd919f51e18b3e7 (patch)
treecee6cbf6324f65bb21be7b54c7d8c1795af4dd99 /CMakeScripts
parentFix revno (diff)
downloadinkscape-7811297f0ad86acaad0477096dd919f51e18b3e7.tar.gz
inkscape-7811297f0ad86acaad0477096dd919f51e18b3e7.zip
Fix revno with git
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/inkscape-version.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake
index 65903c47b..12b8a26d8 100644
--- a/CMakeScripts/inkscape-version.cmake
+++ b/CMakeScripts/inkscape-version.cmake
@@ -12,10 +12,18 @@ set(INKSCAPE_REVISION "unknown")
set(INKSCAPE_CUSTOM "custom")
if(EXISTS ${INKSCAPE_SOURCE_DIR}/.git/)
- execute_process(COMMAND
- git describe ${INKSCAPE_SOURCE_DIR}
- OUTPUT_VARIABLE INKSCAPE_REVISION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ execute_process(COMMAND git describe
+ COMMAND tr "\n" " "
+ WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
+ OUTPUT_VARIABLE INKSCAPE_REV1)
+ execute_process(COMMAND git show --format=format:%ad --date=short
+ COMMAND head -n 1
+ COMMAND tr "\n" " "
+ WORKING_DIRECTORY ${INKSCAPE_SOURCE_DIR}
+ OUTPUT_VARIABLE INKSCAPE_REV2
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(INKSCAPE_REVISION ${INKSCAPE_REV1} ${INKSCAPE_REV2})
execute_process(COMMAND
git status -s ${INKSCAPE_SOURCE_DIR}/src