diff --git a/src/app/app.pro b/src/app/app.pro index 36a6c4786..f302a0b2b 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -134,6 +134,15 @@ message(Translation files: $$[QT_INSTALL_TRANSLATIONS]) message(Settings: $$[QT_INSTALL_SETTINGS]) message(Examples: $$[QT_INSTALL_EXAMPLES]) +#local revision number for using in version +!system(hg) { + DEFINES += LOCAL_REVISION=\\\"0\\\" +} +else +{ + DEFINES += LOCAL_REVISION=$$system(hg parents --template '{rev}') +} + win32:RC_FILE = share/resources/valentina.rc # Remove generated files at cleaning diff --git a/src/app/version.cpp b/src/app/version.cpp index dd8ffccbc..46287794c 100644 --- a/src/app/version.cpp +++ b/src/app/version.cpp @@ -32,6 +32,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 2; extern const int DEBUG_VERSION = 2; -extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); +extern const QString APP_VERSION(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION) + .arg(LOCAL_REVISION)); extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.");