From cf587e711542230b669bdecb14109a1a75ac7319 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 20 May 2022 14:17:40 +0200 Subject: [PATCH] Update Mac build scripts (#1198) --- .github/scripts/app/bootstrap_mac.sh | 4 ++-- .github/scripts/app/build_mac.sh | 2 +- rel/app/standalone.exs | 17 +---------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/scripts/app/bootstrap_mac.sh b/.github/scripts/app/bootstrap_mac.sh index 0d4ea5bf5..cbe22520a 100755 --- a/.github/scripts/app/bootstrap_mac.sh +++ b/.github/scripts/app/bootstrap_mac.sh @@ -5,8 +5,8 @@ main() { export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) wxwidgets_vsn="3.1.5" - otp_vsn="24.2" - elixir_vsn="1.13.2" + otp_vsn="25.0" + elixir_vsn="1.13.4" target=$(target) diff --git a/.github/scripts/app/build_mac.sh b/.github/scripts/app/build_mac.sh index 71987ee02..61d04a321 100755 --- a/.github/scripts/app/build_mac.sh +++ b/.github/scripts/app/build_mac.sh @@ -9,7 +9,7 @@ set -e sh .github/scripts/app/bootstrap_mac.sh -. tmp/bootstrap_env.sh +sh tmp/bootstrap_env.sh # If CODESIGN_IDENITY is set, let's build the .dmg which would also notarize it. # Otherwise, let's build just the .app. diff --git a/rel/app/standalone.exs b/rel/app/standalone.exs index c7b327943..e5373e742 100644 --- a/rel/app/standalone.exs +++ b/rel/app/standalone.exs @@ -72,7 +72,7 @@ defmodule Standalone do end defp download_elixir_at_destination(destination, version) do - url = "https://github.com/elixir-lang/elixir/releases/download/v#{version}/Precompiled.zip" + url = "https://repo.hex.pm/builds/elixir/v#{version}-otp-#{System.otp_release()}.zip" path = Path.join(System.tmp_dir!(), "elixir_#{version}.zip") unless File.exists?(path) do @@ -115,19 +115,4 @@ defmodule Standalone do defp cp_r!(source, destination) do File.cp_r!(source, destination, fn _, _ -> false end) end - - # From https://github.com/fishcakez/dialyze/blob/6698ae582c77940ee10b4babe4adeff22f1b7779/lib/mix/tasks/dialyze.ex#L168 - defp otp_version do - major = :erlang.system_info(:otp_release) |> List.to_string() - vsn_file = Path.join([:code.root_dir(), "releases", major, "OTP_VERSION"]) - - try do - vsn_file |> File.read!() |> String.split("\n", trim: true) - else - [full] -> full - _ -> major - catch - :error, _ -> major - end - end end