diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-06-17 15:15:18 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-06-25 16:37:28 +0000 |
commit | bc4c2f8a155dd09b223955a650c9e0a6a92b63d8 (patch) | |
tree | 5ec6e7ef0aed45e94ddcbbdcbfe822ea131c62ff /scripts/common.py | |
parent | 5b53ac9661a3a3c0c275cd2f15a6a22a36682391 (diff) |
Use the packaging script for the github action
Unifies a bit of what is done. For example this adds documentation and creates a disk image for
macOS. It will also make adding perfparser/elfutils and 32bit wininterrupt and qtcreatorcdbext
easier.
Adds Qt translations.
Adds some useful options to build.py and make it work with python3
Disables detection of debug vs release build in deployqt.py on Windows
if dumpbin is not there (for MinGW).
Change-Id: I3cc33144cad653823321209c219d220eb75093ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'scripts/common.py')
-rw-r--r-- | scripts/common.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/common.py b/scripts/common.py index 61923803fb..d033108648 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -40,18 +40,20 @@ def is_linux_platform(): def is_mac_platform(): return sys.platform.startswith('darwin') -def check_print_call(command, workdir): +def check_print_call(command, workdir, env=None): print('------------------------------------------') print('COMMAND:') print(' '.join(['"' + c.replace('"', '\\"') + '"' for c in command])) print('PWD: "' + workdir + '"') print('------------------------------------------') - subprocess.check_call(command, cwd=workdir) + subprocess.check_call(command, cwd=workdir, env=env) def get_git_SHA(path): try: - return subprocess.check_output(['git', 'rev-list', '-n1', 'HEAD'], cwd=path).strip() + output = subprocess.check_output(['git', 'rev-list', '-n1', 'HEAD'], cwd=path).strip() + decoded_output = output.decode(encoding) if encoding else output + return decoded_output except subprocess.CalledProcessError: return None return None |