From 4005f9476688110e27ae2ec5091d77f17eb0216f Mon Sep 17 00:00:00 2001 From: Gres Date: Mon, 9 Mar 2020 12:57:14 +0300 Subject: [PATCH] Use version from .pro file --- screen-translator.pro | 5 +++-- share/ci/config.py | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/screen-translator.pro b/screen-translator.pro index 65d7dd8..bdf93d2 100644 --- a/screen-translator.pro +++ b/screen-translator.pro @@ -18,8 +18,9 @@ linux{ LIBS += -lX11 } -DEFINES += VERSION="3.0.0" -VERSION = 3.0.0.0 +VER=3.0.0 +DEFINES += VERSION="$$VER" +VERSION = $$VER.0 QMAKE_TARGET_COMPANY = Gres QMAKE_TARGET_PRODUCT = Screen Translator QMAKE_TARGET_COPYRIGHT = Copyright (c) Gres diff --git a/share/ci/config.py b/share/ci/config.py index d24a1fc..04230d3 100644 --- a/share/ci/config.py +++ b/share/ci/config.py @@ -1,7 +1,7 @@ from os import getenv, path +import re app_name = 'ScreenTranslator' -app_version = '3.0.0' target_name = app_name qt_version = '5.14.0' @@ -14,6 +14,11 @@ build_dir = path.abspath('build') dependencies_dir = path.abspath('deps') pro_file = path.abspath(path.dirname(__file__) + '/../../screen-translator.pro') +app_version = 'testing' +with open(pro_file, 'r') as f: + match = re.search(r'VER=(.*)', f.read()) + if match: + app_version = match.group(1) ts_files_dir = path.abspath(path.dirname(__file__) + '/../../translations') os_name = getenv('OS', 'linux')