diff options
Diffstat (limited to 'desktop/package/macos/build.py')
-rwxr-xr-x | desktop/package/macos/build.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/desktop/package/macos/build.py b/desktop/package/macos/build.py index 0cf3c57c..f9af29c5 100755 --- a/desktop/package/macos/build.py +++ b/desktop/package/macos/build.py @@ -33,6 +33,12 @@ def main(): cli_dir = os.path.join(root, "cli") desktop_dir = os.path.join(root, "desktop") + print("○ Clean up from last build") + if os.path.exist(os.path.join(cli_dir, "dist")): + shutil.rmtree(os.path.join(cli_dir, "dist")) + if os.path.exists(os.path.join(desktop_dir, "macOS")): + shutil.rmtree(os.path.join(desktop_dir, "macOS")) + print("○ Building onionshare-cli") run(["poetry", "install"], cli_dir) run(["poetry", "build"], cli_dir) @@ -40,10 +46,6 @@ def main(): whl_basename = os.path.basename(whl_filename) shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename)) - print("○ Clean up from last build") - if os.path.exists(os.path.join(desktop_dir, "macOS")): - shutil.rmtree(os.path.join(desktop_dir, "macOS")) - print("○ Create app bundle") run(["briefcase", "create"], desktop_dir) app_path = os.path.join(desktop_dir, "macOS", "OnionShare", "OnionShare.app") |