From 868b1fa2b6847fda625e571a92729e497194f6fc Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 19 Dec 2021 17:42:11 -0800 Subject: [PATCH] Update release docs, and remove appimage script that didn't work --- RELEASE.md | 43 ++++------------------- desktop/package/linux/build-appimage.py | 46 ------------------------- 2 files changed, 7 insertions(+), 82 deletions(-) delete mode 100755 desktop/package/linux/build-appimage.py diff --git a/RELEASE.md b/RELEASE.md index 7021b362..4dcd1770 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -9,9 +9,9 @@ Before making a release, you must update the version in these places: - [ ] `cli/pyproject.toml` - [ ] `cli/setup.py` - [ ] `cli/onionshare_cli/resources/version.txt` -- [ ] `desktop/pyproject.toml` (under `version` and **don't forget** the `./onionshare_cli-$VERSION-py3-none-any.whl` dependency) -- [ ] `desktop/src/setup.py` -- [ ] `desktop/src/org.onionshare.OnionShare.appdata.xml` +- [ ] `desktop/pyproject.toml` +- [ ] `desktop/setup.py` +- [ ] `desktop/org.onionshare.OnionShare.appdata.xml` - [ ] `docs/source/conf.py` (`version` at the top, and the `versions` list too) - [ ] `snap/snapcraft.yaml` @@ -19,6 +19,7 @@ If you update `flask-socketio`, ensure that you also update the [socket.io.min.j Use tor binaries from the latest Tor Browser: +- [ ] `desktop/scripts/get-tor-linux.py` - [ ] `desktop/scripts/get-tor-osx.py` - [ ] `desktop/scripts/get-tor-windows.py` @@ -42,7 +43,7 @@ Finalize localization: You also must edit these files: -- [ ] `desktop/src/org.onionshare.OnionShare.appdata.xml` should have the correct release date, and links to correct screenshots +- [ ] `desktop/org.onionshare.OnionShare.appdata.xml` should have the correct release date, and links to correct screenshots - [ ] `CHANGELOG.md` should be updated to include a list of all major changes since the last release Make sure snapcraft packaging works. In `snap/snapcraft.yaml`: @@ -97,38 +98,14 @@ snapcraft login snapcraft upload --release=stable onionshare_$VERSION_amd64.snap ``` -## Linux AppImage release - -_Note: AppImage packages are currently broken due to [this briefcase bug](https://github.com/beeware/briefcase/issues/504). Until it's fixed, OnionShare for Linux will only be available in Flatpak and Snapcraft._ - -Set up the development environment described in `README.md`. - -Make sure your virtual environment is active: - -```sh -. venv/bin/activate -``` - -Run the AppImage build script: - -```sh -./package/linux/build-appimage.py -``` - ## Windows Set up the development environment described in `README.md`. And install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) and add `C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86` to your path. -Make sure your virtual environment is active: - -``` -venv\Scripts\activate.bat -``` - Run the Windows build script: ``` -python package\windows\build.py +poetry run python .\package\windows\build.py ``` This will create `desktop/windows/OnionShare-$VERSION.msi`, signed. @@ -141,16 +118,10 @@ Set up the development environment described in `README.md`. And install `create brew install create-dmg ``` -Make sure your virtual environment is active: - -```sh -. venv/bin/activate -``` - Run the macOS build script: ```sh -./package/macos/build.py --with-codesign +poetry run ./package/macos/build.py --with-codesign ``` Now, notarize the release. You must have an app-specific Apple ID password saved in the login keychain called `onionshare-notarize`. 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()