build(elixir): download ffi libs from new location for linux
Depends on to be released
defmodule Ockam.Vault.Software.MixProject do
use Mix.Project
- @version "0.70.0"
+ @version "0.78.0"
@elixir_requirement "~> 1.12"
@ockam_release_url "https://github.com/build-trust/ockam/releases"
@download_libs [
- {"ockam.linux_elixir_ffi.so", ["linux_x86_64_gnu", "native", "libockam_elixir_ffi.so"]},
+ {"ockam.linux_x86_64_gnu_elixir_ffi.so",
+ ["linux_x86_64_gnu", "native", "libockam_elixir_ffi.so"]},
+ {"ockam.linux_aarch64_gnu_elixir_ffi.so",
+ ["linux_aarch64_gnu", "native", "libockam_elixir_ffi.so"]},
{"ockam.darwin_universal_elixir_ffi.so",
["darwin_universal", "native", "libockam_elixir_ffi.so"]}
]
@@ -149,7 +152,7 @@ defmodule Ockam.Vault.Software.MixProject do
IO.puts("Downloading lib from #{download_url} to #{dest_file}")
File.rm_rf(dest_file)
- {:ok, :saved_to_file} =
+ download_result =
:httpc.request(
:get,
{to_charlist(download_url), []},
@@ -158,6 +161,12 @@ defmodule Ockam.Vault.Software.MixProject do
[{:ssl, [{:versions, [:"tlsv1.2"]}]}],
stream: to_charlist(dest_file)
)
+
+ case download_result do
+ {:ok, :saved_to_file} -> IO.puts("Download OK")
+ {:ok, other} -> IO.puts("Download error: #{inspect(other)}")
+ other -> IO.puts("Download error: #{inspect(other)}")
+ end
end)
end
