From bd44c0ba7eb8f4b024880055a6df011bea1fb289 Mon Sep 17 00:00:00 2001 From: PJ Date: Mon, 22 Jun 2026 11:42:48 -0400 Subject: [PATCH] changes --- .github/workflows/release.yml | 17 +++++++++++++---- src-tauri/Cargo.lock | 2 +- src-tauri/src/lib.rs | 15 +++++++++++---- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06f61b6..a582789 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,7 +71,6 @@ jobs: needs: prepare strategy: fail-fast: false - max-parallel: 1 matrix: include: - os: macos-latest @@ -140,9 +139,19 @@ jobs: needs: [prepare, build] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 - - name: Publish release + - name: Verify manifest is complete, then publish env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} TAG: ${{ needs.prepare.outputs.tag }} - run: gh release edit "$TAG" --draft=false --latest + run: | + gh release download "$TAG" --repo "$REPO" --pattern latest.json --output latest.json --clobber + echo "Platforms in latest.json:" + jq '.platforms | keys' latest.json + for key in darwin-aarch64 darwin-x86_64 linux-x86_64 windows-x86_64; do + if ! jq -e ".platforms[\"$key\"].url" latest.json > /dev/null; then + echo "::error::latest.json is missing platform '$key' — refusing to publish a partial update manifest. Re-run the release." + exit 1 + fi + done + gh release edit "$TAG" --repo "$REPO" --draft=false --latest diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index cb11b19..20f9a7a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4704,7 +4704,7 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "margin-app" -version = "0.1.0" +version = "0.1.1" dependencies = [ "base64 0.22.1", "harper-core", diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index e34dafc..3a8f153 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -58,11 +58,18 @@ fn build_menu(handle: &tauri::AppHandle) -> tauri::Result #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { - tauri::Builder::default() + let context = tauri::generate_context!(); + + let mut builder = tauri::Builder::default() .plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_dialog::init()) - .plugin(tauri_plugin_updater::Builder::new().build()) - .plugin(tauri_plugin_process::init()) + .plugin(tauri_plugin_process::init()); + + if context.config().plugins.0.contains_key("updater") { + builder = builder.plugin(tauri_plugin_updater::Builder::new().build()); + } + + builder .manage(proofing::new_state()) .menu(|handle| build_menu(handle)) .on_menu_event(|app, event| { @@ -87,6 +94,6 @@ pub fn run() { proofing::proof_text, proofing::remember_word ]) - .run(tauri::generate_context!()) + .run(context) .expect("error while running margin"); }