summaryrefslogtreecommitdiff
path: root/desktop/package/linux/build-appimage.py
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/package/linux/build-appimage.py')
-rwxr-xr-xdesktop/package/linux/build-appimage.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/desktop/package/linux/build-appimage.py b/desktop/package/linux/build-appimage.py
index 8fcbda90..30c5de94 100755
--- a/desktop/package/linux/build-appimage.py
+++ b/desktop/package/linux/build-appimage.py
@@ -23,6 +23,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, "linux")):
+ shutil.rmtree(os.path.join(desktop_dir, "linux"))
+
print("○ Building onionshare-cli")
run(["poetry", "install"], cli_dir)
run(["poetry", "build"], cli_dir)
@@ -30,10 +36,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, "linux")):
- shutil.rmtree(os.path.join(desktop_dir, "linux"))
-
print("○ Create the binary")
run(["briefcase", "create"], desktop_dir)