From 34ad1add65696fc949c26e9417e391eeee6149d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Tue, 18 Jul 2023 17:23:24 +0200 Subject: [PATCH] fix releases --- .github/workflows/release.yml | 4 ++-- CHANGELOG.md | 5 +++++ Cargo.toml | 4 +++- rust-toolchain.nix | 2 +- src/main.rs | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6bd409b..3a2fc3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Install Nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-22.11 extra_nix_config: | @@ -139,7 +139,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: Install Nix - uses: cachix/install-nix-action@v20 + uses: cachix/install-nix-action@v22 with: nix_path: nixpkgs=channel:nixos-22.11 extra_nix_config: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 51cb174..616d2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed windows releases due to `coredump` crate compilation error. +- Fixed macos releases due to macos 12 System Integrity Protection. + ## [0.8.2] - 2023-07-18 ### Changed diff --git a/Cargo.toml b/Cargo.toml index fff8d9f..815f57d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,6 @@ clap = "4.0" clap_complete = "4.0" clap_mangen = "0.2" console = "0.15.2" -coredump = "=0.1.2" dialoguer = "0.10.2" dirs = "4.0.0" email_address = "0.2.4" @@ -67,3 +66,6 @@ uuid = { version = "0.8", features = ["v4"] } rusqlite = { version = "0.29", features = [] } [target.'cfg(not(target_env = "musl"))'.dependencies] rusqlite = { version = "0.29", features = ["bundled"] } + +[target.'cfg(not(target_env = "windows"))'.dependencies] +coredump = "=0.1.2" diff --git a/rust-toolchain.nix b/rust-toolchain.nix index bc525ab..7db4068 100644 --- a/rust-toolchain.nix +++ b/rust-toolchain.nix @@ -2,7 +2,7 @@ fenix: let file = ./rust-toolchain.toml; - sha256 = "gdYqng0y9iHYzYPAdkC/ka3DRny3La/S5G8ASj0Ayyc="; + sha256 = "ks0nMEGGXKrHnfv4Fku+vhQ7gx76ruv6Ij4fKZR3l78="; in { fromFile = { system }: fenix.packages.${system}.fromToolchainFile { diff --git a/src/main.rs b/src/main.rs index d4950a4..eb65dbb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use anyhow::{anyhow, Context, Result}; use clap::Command; -use coredump::register_panic_handler; use log::{debug, warn}; #[cfg(feature = "imap-backend")] use pimalaya_email::backend::ImapBackend; @@ -49,7 +48,8 @@ fn create_app() -> Command { #[allow(clippy::single_match)] #[tokio::main] async fn main() -> Result<()> { - if let Err((_, err)) = register_panic_handler() { + #[cfg(not(target_os = "windows"))] + if let Err((_, err)) = coredump::register_panic_handler() { warn!("cannot register custom panic handler: {err}"); debug!("cannot register custom panic handler: {err:?}"); }