mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 07:19:30 -05:00
Fix macOS cleanup script
This commit is contained in:
parent
9b28a9393a
commit
49471a835a
@ -104,7 +104,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
poetry run python .\setup-freeze.py build
|
poetry run python .\setup-freeze.py build
|
||||||
poetry run python .\script\build-windows.py cleanup-build
|
poetry run python .\scripts\build-windows.py cleanup-build
|
||||||
- run:
|
- run:
|
||||||
name: Compress
|
name: Compress
|
||||||
command: |
|
command: |
|
||||||
@ -152,7 +152,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
C:\Python-32bit\Scripts\poetry run python .\setup-freeze.py build
|
C:\Python-32bit\Scripts\poetry run python .\setup-freeze.py build
|
||||||
C:\Python-32bit\Scripts\poetry run python .\package\windows.py cleanup-build
|
C:\Python-32bit\Scripts\poetry run python .\scripts\build-windows.py cleanup-build
|
||||||
- run:
|
- run:
|
||||||
name: Compress
|
name: Compress
|
||||||
command: |
|
command: |
|
||||||
@ -201,7 +201,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
cd ~/project/desktop
|
cd ~/project/desktop
|
||||||
poetry run python ./setup-freeze.py bdist_mac
|
poetry run python ./setup-freeze.py bdist_mac
|
||||||
poetry run python ./install/build-macos.py cleanup-build
|
poetry run python ./scripts/build-macos.py cleanup-build
|
||||||
- run:
|
- run:
|
||||||
name: Compress
|
name: Compress
|
||||||
command: zip -r ~/onionshare-macos.zip ~/project/desktop/build/OnionShare.app
|
command: zip -r ~/onionshare-macos.zip ~/project/desktop/build/OnionShare.app
|
||||||
|
@ -142,9 +142,14 @@ def cleanup_build():
|
|||||||
shutil.rmtree(
|
shutil.rmtree(
|
||||||
f"{app_path}/Contents/MacOS/lib/PySide2/Qt/lib/{framework}.framework"
|
f"{app_path}/Contents/MacOS/lib/PySide2/Qt/lib/{framework}.framework"
|
||||||
)
|
)
|
||||||
|
print(
|
||||||
|
f"Deleted: {app_path}/Contents/MacOS/lib/PySide2/Qt/lib/{framework}.framework"
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
os.remove(f"{app_path}/Contents/MacOS/lib/PySide2/{framework}.abi3.so")
|
os.remove(f"{app_path}/Contents/MacOS/lib/PySide2/{framework}.abi3.so")
|
||||||
os.remove(f"{app_path}/Contents/MacOS/lib/PySide2/{framework}.pyi")
|
os.remove(f"{app_path}/Contents/MacOS/lib/PySide2/{framework}.pyi")
|
||||||
|
print(f"Deleted: {app_path}/Contents/MacOS/lib/PySide2/{framework}.abi3.so")
|
||||||
|
print(f"Deleted: {app_path}/Contents/MacOS/lib/PySide2/{framework}.pyi")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -219,10 +224,12 @@ def cleanup_build():
|
|||||||
f"{app_path}/Contents/Resources/lib/PySide2/rcc",
|
f"{app_path}/Contents/Resources/lib/PySide2/rcc",
|
||||||
f"{app_path}/Contents/Resources/lib/PySide2/uic",
|
f"{app_path}/Contents/Resources/lib/PySide2/uic",
|
||||||
]:
|
]:
|
||||||
if os.path.isdir(filename):
|
if os.path.isfile(filename) or os.path.islink(filename):
|
||||||
shutil.rmtree(filename)
|
|
||||||
elif os.path.isfile(filename):
|
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
print(f"Deleted: {filename}")
|
||||||
|
elif os.path.isdir(filename):
|
||||||
|
shutil.rmtree(filename)
|
||||||
|
print(f"Deleted: {filename}")
|
||||||
else:
|
else:
|
||||||
print(f"Cannot delete, filename not found: {filename}")
|
print(f"Cannot delete, filename not found: {filename}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user