diff --git a/share/ci/appimage.py b/share/ci/appimage.py index d9593a7..cbdc126 100644 --- a/share/ci/appimage.py +++ b/share/ci/appimage.py @@ -55,3 +55,6 @@ c.run('{} {}/usr/share/applications/*.desktop {} -appimage -qmake={}/bin/qmake'. linuxdeployqt_bin, install_dir, flags, qt_dir)) c.run('mv {}-{}*.AppImage "{}"'.format(app_name, app_version, artifact_path)) + +bin_path = install_dir + '/usr/bin/' + bin_name +c.print('>> Md5 {} {}'.format(bin_path, c.md5sum(bin_path))) diff --git a/share/ci/common.py b/share/ci/common.py index 209fdce..2ea71a3 100644 --- a/share/ci/common.py +++ b/share/ci/common.py @@ -10,6 +10,7 @@ import multiprocessing import platform import re import ast +import hashlib print = functools.partial(print, flush=True) @@ -208,3 +209,13 @@ def apply_cmd_env(cmd): print('>>> Changing env', key, '\nfrom\n', os.environ[key], '\nto\n', value) os.environ[key] = value + + +def md5sum(path): + if not os.path.exists(path): + return '' + md5 = hashlib.md5() + with open(path, 'rb') as f: + md5.update(f.read()) + return md5.hexdigest() + return '' diff --git a/share/ci/config.py b/share/ci/config.py index 48dce73..a59b2e9 100644 --- a/share/ci/config.py +++ b/share/ci/config.py @@ -18,6 +18,7 @@ pro_file = path.abspath(path.dirname(__file__) + '/../../screen-translator.pro') test_pro_file = path.abspath(path.dirname(__file__) + '/../../tests/tests.pro') +bin_name = 'screen-translator' app_version = 'testing' with open(pro_file, 'r') as f: match = re.search(r'VER=(.*)', f.read()) diff --git a/share/ci/windeploy.py b/share/ci/windeploy.py index 8bf1576..c4c14f9 100644 --- a/share/ci/windeploy.py +++ b/share/ci/windeploy.py @@ -38,3 +38,6 @@ for f in glob(ssl_dir + '/bin/*.dll'): shutil.copy(f, install_dir) c.archive(c.get_folder_files(os.path.relpath(install_dir)), artifact_path) + +bin_path = install_dir + '\\' + bin_name + '.exe' +c.print('>> Md5 {} {}'.format(bin_path, c.md5sum(bin_path)))