diff options
author | Micah Lee <micah@micahflee.com> | 2022-01-16 15:49:33 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2022-01-16 15:49:33 -0800 |
commit | 9e99ad8b8d6f0eb0a2162191ec31a68e7c3acee5 (patch) | |
tree | 5a5215260866bd07adc60ead1ae0d1b6cd93174b /desktop/package/linux/build-appimage.py | |
parent | 74711e7d7c7b825fc580c612530569195156794a (diff) | |
parent | b4e022149d677f9c2acd639e9dfa77bcc712b068 (diff) | |
download | onionshare-9e99ad8b8d6f0eb0a2162191ec31a68e7c3acee5.tar.gz onionshare-9e99ad8b8d6f0eb0a2162191ec31a68e7c3acee5.zip |
Merge branch 'develop' of github.com:onionshare/onionshare into ros-fixes
Diffstat (limited to 'desktop/package/linux/build-appimage.py')
-rwxr-xr-x | desktop/package/linux/build-appimage.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/desktop/package/linux/build-appimage.py b/desktop/package/linux/build-appimage.py deleted file mode 100755 index dfaba1b4..00000000 --- a/desktop/package/linux/build-appimage.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python3 -import os -import inspect -import subprocess -import shutil -import glob - -root = os.path.dirname( - os.path.dirname( - os.path.dirname( - os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) - ) - ) -) - - -def run(cmd, cwd=None): - subprocess.run(cmd, cwd=cwd, check=True) - - -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.exists(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) - whl_filename = glob.glob(os.path.join(cli_dir, "dist", "*.whl"))[0] - whl_basename = os.path.basename(whl_filename) - shutil.copyfile(whl_filename, os.path.join(desktop_dir, whl_basename)) - - print("○ Create the binary") - run(["briefcase", "create"], desktop_dir) - - print("○ Create the AppImage") - run(["briefcase", "build"], desktop_dir) - - -if __name__ == "__main__": - main() |