mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-02 09:46:48 +08:00
Fix windows archive creation filename
This commit is contained in:
parent
7c461a57fb
commit
f01fec9c05
1 changed files with 7 additions and 1 deletions
|
@ -332,8 +332,14 @@ def create_archive(platform: str, arch: str, audience: str, build_type: str, out
|
|||
nuitka_standalone_suffix = ".dist"
|
||||
compiled_output = os.path.join(output_dir, "npbackup-{}{}".format(build_type, nuitka_standalone_suffix))
|
||||
new_compiled_output = compiled_output[:-len(nuitka_standalone_suffix)]
|
||||
if os.path.isdir(new_compiled_output):
|
||||
shutil.rmtree(new_compiled_output)
|
||||
shutil.move(compiled_output, new_compiled_output)
|
||||
target_archive = f"{output_dir}/npbackup-{platform}-{arch}-{build_type}-{audience}.tar.gz"
|
||||
if os.name == "nt":
|
||||
archive_extension="zip"
|
||||
else:
|
||||
archive_extension="tar.gz"
|
||||
target_archive = f"{output_dir}/npbackup-{platform}-{arch}-{build_type}-{audience}.{archive_extension}"
|
||||
if os.path.isfile(target_archive):
|
||||
os.remove(target_archive)
|
||||
if os.name == 'nt':
|
||||
|
|
Loading…
Add table
Reference in a new issue