Skip to content

Commit

Permalink
ref macos📦 dmg 命名
Browse files Browse the repository at this point in the history
  • Loading branch information
zy7y committed Apr 29, 2024
1 parent 54f3888 commit c8a7d28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os.path
import platform
import shutil
import subprocess

import pymysql
Expand Down Expand Up @@ -92,9 +93,9 @@ def get_pyinstaller_add_data_by_package(name):
# 如果是macos,则压缩打包后的目录
if platform.system() == "Darwin":
subprocess.call(["npm", "i", "-g", "create-dmg"])
subprocess.call(["create-dmg", "client.app", "--dmg-title", "client.dmg"], cwd="dist")
subprocess.call(["rm", "-rf", "dist/client.app"])
subprocess.call(["rm", "-rf", "dist/client"])
subprocess.call(["create-dmg", "dist/client.app"])
subprocess.call(["rm", "-rf", "dist/*"])
shutil.move("client 0.0.0.dmg", "client.dmg")

if os.path.isfile(CLIENT_PY):
os.remove(CLIENT_PY)

0 comments on commit c8a7d28

Please sign in to comment.