Fix renaming compiled standalone dirs

This commit is contained in:
deajan 2024-05-27 12:00:19 +02:00
parent fa86d80d88
commit b55c4d8314

View file

@ -329,10 +329,11 @@ def create_tar(platform: str, arch: str, audience: str, build_type: str, output_
"""
Create tar releases for each compiled version
"""
output = os.path.join(output_dir, "npbackup-{}.dist".format(build_type))
new_output = output.rstrip(".dist")
nuitka_standalone_suffix = ".dist"
output = os.path.join(output_dir, "npbackup-{}{}".format(build_type, nuitka_standalone_suffix))
new_output = output[:-len(nuitka_standalone_suffix)]
shutil.move(output, new_output)
cmd = "tar -czf {}/npbackup-{}-{}-{}-{}.tar.gz -C {} .".format(output_dir, platform, arch, audience, build_type, output_dir)
cmd = "tar -czf {}/npbackup-{}-{}-{}-{}.tar.gz -C {} .".format(output_dir, platform, arch, audience, build_type, new_output)
exit_code, output = command_runner(cmd, timeout=0, live_output=True)
shutil.move(new_output, output)
if exit_code != 0: