From e9cecc748e82ae2f54ba7b5f7fefd2a17dbf19d9 Mon Sep 17 00:00:00 2001 From: Ashish Kulkarni Date: Mon, 20 Oct 2014 18:57:47 +0530 Subject: [PATCH] change the version format for development builds The suffix is now "-dev-COMMITHASH" which makes it easier for users to differentiate between final releases and interim development snapshots. --- common.pri | 13 ++++--------- scripts/build.py | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/common.pri b/common.pri index ef78ecbb9..82652a427 100644 --- a/common.pri +++ b/common.pri @@ -52,13 +52,8 @@ greaterThan(QT_MAJOR_VERSION, 4) { VERSION_TEXT=$$(WKHTMLTOX_VERSION) isEmpty(VERSION_TEXT): VERSION_TEXT=$$cat($$PWD/VERSION) VERSION_LIST=$$split(VERSION_TEXT, "-") -count(VERSION_LIST, 1) { - VERSION=$$VERSION_TEXT - FULL_VERSION=$$VERSION -} else { - VERSION=$$member(VERSION_LIST, 0) - BUILD=$$member(VERSION_LIST, 1) - FULL_VERSION=$$VERSION-$$BUILD -} -DEFINES += VERSION=$$VERSION FULL_VERSION=$$FULL_VERSION +count(VERSION_LIST, 1): VERSION=$$VERSION_TEXT +else: VERSION=$$member(VERSION_LIST, 0) + +DEFINES += VERSION=$$VERSION FULL_VERSION=$$VERSION_TEXT diff --git a/scripts/build.py b/scripts/build.py index 71fd55179..e54c0195d 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -549,7 +549,7 @@ def get_version(basedir): hash = get_output('git', 'rev-parse', '--short', 'HEAD') if not hash: return (text, version) - return ('%s-%s' % (version, hash), version) + return ('%s-%s' % (text, hash), version) def qt_config(key, *opts): input, output = [], []