23 lines
745 B
Python
23 lines
745 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""重新打包前端部署文件 - 使用正确目录结构"""
|
||
|
|
import os
|
||
|
|
import tarfile
|
||
|
|
|
||
|
|
os.chdir('D:/资料/03-项目开发/wecom_it_smart_desk')
|
||
|
|
|
||
|
|
# 重新打包 frontend-agent
|
||
|
|
print("Repacking frontend-agent...")
|
||
|
|
if os.path.exists('frontend-agent/dist'):
|
||
|
|
with tarfile.open('frontend-agent-dist-v2.tar.gz', 'w:gz') as tar:
|
||
|
|
tar.add('frontend-agent/dist', arcname='dist')
|
||
|
|
print('Created: frontend-agent-dist-v2.tar.gz')
|
||
|
|
|
||
|
|
# 重新打包 frontend-h5
|
||
|
|
print("Repacking frontend-h5...")
|
||
|
|
if os.path.exists('frontend-h5/dist'):
|
||
|
|
with tarfile.open('frontend-h5-dist-v2.tar.gz', 'w:gz') as tar:
|
||
|
|
tar.add('frontend-h5/dist', arcname='dist')
|
||
|
|
print('Created: frontend-h5-dist-v2.tar.gz')
|
||
|
|
|
||
|
|
print('Done!')
|