Skip to content

Commit

Permalink
Constrain ubuntu-24.04 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmj committed May 15, 2024
1 parent acdf89f commit 45bc7a2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/bob/job/otp_checker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule Bob.Job.OTPChecker do
defp build_ref?("ubuntu-20.04", "maint-" <> version), do: build_ubuntu_20?(version)
defp build_ref?("ubuntu-22.04", "OTP-" <> version), do: build_ubuntu_22?(version)
defp build_ref?("ubuntu-22.04", "maint-" <> version), do: build_ubuntu_22?(version)
defp build_ref?("ubuntu-24.04", "OTP-" <> version), do: build_ubuntu_22?(version)
defp build_ref?("ubuntu-24.04", "maint-" <> version), do: build_ubuntu_22?(version)
defp build_ref?("ubuntu-24.04", "OTP-" <> version), do: build_ubuntu_24?(version)
defp build_ref?("ubuntu-24.04", "maint-" <> version), do: build_ubuntu_24?(version)
defp build_ref?(_linux, "OTP-" <> _), do: true
defp build_ref?(_linux, "maint" <> _), do: true
defp build_ref?(_linux, "master" <> _), do: true
Expand All @@ -39,6 +39,19 @@ defmodule Bob.Job.OTPChecker do
erlang_version >= [24, 2]
end

defp build_ubuntu_24?(erlang_version) do
dev_version? = length(String.split(erlang_version, "-")) > 1

# WX compatibility
case parse_otp_ref(erlang_version) do
[25, 0] ->
not dev_version?

version ->
version >= [24, 3, 4]
end
end

defp parse_otp_ref(ref) do
ref
|> String.split("-")
Expand Down

0 comments on commit 45bc7a2

Please sign in to comment.