Print md5 of binary in ci
This commit is contained in:
parent
16ffc3307b
commit
94afaf9497
@ -55,3 +55,6 @@ c.run('{} {}/usr/share/applications/*.desktop {} -appimage -qmake={}/bin/qmake'.
|
|||||||
linuxdeployqt_bin, install_dir, flags, qt_dir))
|
linuxdeployqt_bin, install_dir, flags, qt_dir))
|
||||||
|
|
||||||
c.run('mv {}-{}*.AppImage "{}"'.format(app_name, app_version, artifact_path))
|
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)))
|
||||||
|
@ -10,6 +10,7 @@ import multiprocessing
|
|||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import ast
|
import ast
|
||||||
|
import hashlib
|
||||||
|
|
||||||
|
|
||||||
print = functools.partial(print, flush=True)
|
print = functools.partial(print, flush=True)
|
||||||
@ -208,3 +209,13 @@ def apply_cmd_env(cmd):
|
|||||||
print('>>> Changing env', key, '\nfrom\n',
|
print('>>> Changing env', key, '\nfrom\n',
|
||||||
os.environ[key], '\nto\n', value)
|
os.environ[key], '\nto\n', value)
|
||||||
os.environ[key] = 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 ''
|
||||||
|
@ -18,6 +18,7 @@ pro_file = path.abspath(path.dirname(__file__) +
|
|||||||
'/../../screen-translator.pro')
|
'/../../screen-translator.pro')
|
||||||
test_pro_file = path.abspath(path.dirname(__file__) +
|
test_pro_file = path.abspath(path.dirname(__file__) +
|
||||||
'/../../tests/tests.pro')
|
'/../../tests/tests.pro')
|
||||||
|
bin_name = 'screen-translator'
|
||||||
app_version = 'testing'
|
app_version = 'testing'
|
||||||
with open(pro_file, 'r') as f:
|
with open(pro_file, 'r') as f:
|
||||||
match = re.search(r'VER=(.*)', f.read())
|
match = re.search(r'VER=(.*)', f.read())
|
||||||
|
@ -38,3 +38,6 @@ for f in glob(ssl_dir + '/bin/*.dll'):
|
|||||||
shutil.copy(f, install_dir)
|
shutil.copy(f, install_dir)
|
||||||
|
|
||||||
c.archive(c.get_folder_files(os.path.relpath(install_dir)), artifact_path)
|
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)))
|
||||||
|
Loading…
Reference in New Issue
Block a user