From a997d0b387873115fd9282855652b9a3c11af01c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 9 Feb 2019 09:27:54 +0100 Subject: [PATCH] donate-cpu.py: Introduce version number for client script (#1654) The version number is added to the result output so issues could be more easily reproduced and in the future if it is necessary to handle any specific version of the client by the server in a special way (for example because it is erroneous) this is possible now. --- tools/donate-cpu.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/donate-cpu.py b/tools/donate-cpu.py index 2eff3dbf5..25d77ea5f 100644 --- a/tools/donate-cpu.py +++ b/tools/donate-cpu.py @@ -34,6 +34,12 @@ import tarfile import platform +# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ +# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic +# changes) +CLIENT_VERSION = "1.0.0" + + def checkRequirements(): result = True for app in ['g++', 'git', 'make', 'wget']: @@ -482,6 +488,7 @@ while True: output = 'cppcheck-options: ' + cppcheck_options + '\n' output += 'platform: ' + platform.platform() + '\n' output += 'python: ' + platform.python_version() + '\n' + output += 'client-version: ' + CLIENT_VERSION + '\n' output += 'cppcheck: ' + ' '.join(cppcheckVersions) + '\n' output += 'count:' + count + '\n' output += 'elapsed-time:' + elapsedTime + '\n'