remove useless double zip

This commit is contained in:
shenjack 2023-06-11 18:39:29 +08:00
parent 9ff816c1c2
commit a5ee30a534
2 changed files with 0 additions and 16 deletions

View File

@ -102,11 +102,3 @@ jobs:
name: Difficult-Rocket_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}}-Build.${{github.run_number}}+${{env.short_sha}}.zip name: Difficult-Rocket_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}}-Build.${{github.run_number}}+${{env.short_sha}}.zip
path: | path: |
build/github/DR.dist build/github/DR.dist
# Uploads artifact
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Difficult-Rocket_v${{env.DR_version}}-${{runner.os}}${{matrix.python-version}}-Build.${{github.run_number}}+${{env.short_sha}}.zip.zip
path: |
build/Difficult_Rocket.zip

View File

@ -107,14 +107,6 @@ if __name__ == '__main__':
except Exception: except Exception:
traceback.print_exc() traceback.print_exc()
print('Remove Useless Files Done!') print('Remove Useless Files Done!')
# 压缩
with zipfile.ZipFile(Path('./build/Difficult_Rocket.zip'), 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
for path, sub_paths, sub_files in os.walk(compiler.output_path / 'DR.dist'):
print(f'writing {path}')
for file in sub_files:
file_path = os.path.join(path, file)
dist_zip.write(file_path)
print('Zip Done!')
else: else:
dist_dir_size = 0 dist_dir_size = 0
dist_file_size: Dict[str, Tuple[int, float]] = {} dist_file_size: Dict[str, Tuple[int, float]] = {}