From eb17d6b37ebcbb9b78c846e4b60a5fb7cb2d9c4e Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 30 Dec 2014 23:21:59 +0200 Subject: [PATCH] Command for taking build revision number now work on Windows. --HG-- branch : develop --- src/app/app.pro | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/app.pro b/src/app/app.pro index 212216cce..8cd33d0f9 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -126,13 +126,20 @@ CONFIG(debug, debug|release){ isEmpty(HG_DISTANCE){ HG_DISTANCE = 0 # if we can't find local revision left 0. } + message("Latest tag distance:" $${HG_DISTANCE}) DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest tag distance number in sources. #build revision number for using in version - HG_HESH=$$system("hg log -r tip --template '{node|short}'") + unix { + HG_HESH=$$system("hg log -r tip --template '{node|short}'") + } else { + # Use escape character before "|" on Windows + HG_HESH=$$system(hg log -r tip --template "{node^|short}") + } isEmpty(HG_HESH){ HG_HESH = "unknown" # if we can't find build revision left unknown. } + message("Build revision:" $${HG_HESH}) DEFINES += "BUILD_REVISION=\\\"$${HG_HESH}\\\"" # Make available build revision number in sources. }