diff --git a/lib/package/macos.ex b/lib/package/macos.ex index 8eb5250..a2ce420 100644 --- a/lib/package/macos.ex +++ b/lib/package/macos.ex @@ -690,6 +690,8 @@ defmodule Desktop.Deployment.Package.MacOS do end defp uid_to_string(uid) when is_list(uid), do: List.to_string(uid) + # DirectoryString as decoded by :public_key, e.g. {:utf8String, "..."} + defp uid_to_string({_type, uid}), do: uid_to_string(uid) defp uid_to_string(uid), do: to_string(uid) def maybe_import_p12(file, password, uids, keychain_password \\ nil) do @@ -796,7 +798,7 @@ defmodule Desktop.Deployment.Package.MacOS do end defp scan({:AttributeTypeAndValue, @friendly_attribute, friendly}) do - case Regex.scan(~r/\(([^)]+)\)$/, friendly) do + case Regex.scan(~r/\(([^)]+)\)$/, uid_to_string(friendly)) do [[_full, uid]] -> [uid] _ -> [] end diff --git a/mix.exs b/mix.exs index e53244d..faabf56 100644 --- a/mix.exs +++ b/mix.exs @@ -38,11 +38,11 @@ defmodule Desktop.Deployment.MixProject do defp deps do [ # Credo - {:httpoison, "~> 2.0", runtime: false}, + {:httpoison, "~> 3.0", runtime: false}, {:credo, "~> 1.5", only: [:dev, :test], runtime: false}, # 1.3.0+ (icon embedding) is on GitHub; switch to Hex once published. {:libpe, github: "elixir-desktop/libpe", branch: "master"}, - {:poison, "~> 3.0"} + {:poison, "~> 6.0"} ] end end diff --git a/test/codesign_test.exs b/test/codesign_test.exs index 2b3e9f9..8fd6c81 100644 --- a/test/codesign_test.exs +++ b/test/codesign_test.exs @@ -1,6 +1,8 @@ defmodule CodesignTest do use ExUnit.Case + @moduletag :macos + test "codesign a new binary" do {_, 0} = System.cmd("gcc", ["test/priv/main.c", "-o", "unsigned_main"]) Desktop.Deployment.Package.MacOS.codesign_executable("unsigned_main") diff --git a/test/test_helper.exs b/test/test_helper.exs index 869559e..4397083 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1 +1,2 @@ -ExUnit.start() +exclude = if match?({:unix, :darwin}, :os.type()), do: [], else: [:macos] +ExUnit.start(exclude: exclude)