Procházet zdrojové kódy

Merge pull request #14301 from emqx/fix/william/macos-quicer-no-build

macOS quicer build fix
William Yang před 1 rokem
rodič
revize
af5c0cc760
3 změnil soubory, kde provedl 5 přidání a 31 odebrání
  1. 2 8
      apps/emqx/rebar.config.script
  2. 2 9
      mix.exs
  3. 1 14
      rebar.config.erl

+ 2 - 8
apps/emqx/rebar.config.script

@@ -12,20 +12,14 @@ IsWin32 = fun() ->
     win32 =:= element(1, os:type())
 end,
 
-IsMacOS = fun() ->
-    {unix, darwin} =:= os:type()
-end,
-
 IsQuicSupp = fun() ->
     not (IsCentos6() orelse IsWin32() orelse
-        IsMacOS() orelse
-        false =/= os:getenv("BUILD_WITHOUT_QUIC")) orelse
-        "1" == os:getenv("BUILD_WITH_QUIC")
+        "1" =:= os:getenv("BUILD_WITHOUT_QUIC"))
 end,
 
 Bcrypt = {bcrypt, {git, "https://github.com/emqx/erlang-bcrypt.git", {tag, "0.6.0"}}},
 Quicer =
-    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.1.9"}}}.
+    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.1.10"}}}.
 
 Dialyzer = fun(Config) ->
     {dialyzer, OldDialyzerConfig} = lists:keyfind(dialyzer, 1, Config),

+ 2 - 9
mix.exs

@@ -1212,7 +1212,7 @@ defmodule EMQXUmbrella.MixProject do
     if enable_quicer?(),
       # in conflict with emqx and emqtt
       do: [
-        {:quicer, github: "emqx/quic", tag: "0.1.9", override: true}
+        {:quicer, github: "emqx/quic", tag: "0.1.10", override: true}
       ],
       else: []
   end
@@ -1225,10 +1225,7 @@ defmodule EMQXUmbrella.MixProject do
 
   def enable_quicer?() do
     "1" == System.get_env("BUILD_WITH_QUIC") or
-      not Enum.any?([
-        macos?(),
-        build_without_quic?()
-      ])
+      not build_without_quic?()
   end
 
   def get_emqx_flavor() do
@@ -1258,10 +1255,6 @@ defmodule EMQXUmbrella.MixProject do
     String.trim(str)
   end
 
-  def macos?() do
-    {:unix, :darwin} == :os.type()
-  end
-
   defp raspbian?() do
     os_cmd("./scripts/get-distro.sh", []) =~ "raspbian"
   end

+ 1 - 14
rebar.config.erl

@@ -36,7 +36,7 @@ assert_otp() ->
     end.
 
 quicer() ->
-    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.1.9"}}}.
+    {quicer, {git, "https://github.com/emqx/quic.git", {tag, "0.1.10"}}}.
 
 jq() ->
     {jq, {git, "https://github.com/emqx/jq", {tag, "v0.3.12"}}}.
@@ -142,23 +142,10 @@ is_community_umbrella_app(_) -> true.
 is_build_without(Name) ->
     "1" =:= os:getenv("BUILD_WITHOUT_" ++ Name).
 
-%% BUILD_WITH_QUIC
-is_build_with(Name) ->
-    "1" =:= os:getenv("BUILD_WITH_" ++ Name).
-
 is_jq_supported() ->
     not is_build_without("JQ").
 
 is_quicer_supported() ->
-    %% for ones who want to build QUIC on macos
-    %% export BUILD_WITH_QUIC=1
-    is_build_with("QUIC") orelse
-        is_quicer_supported(os:type()).
-
-is_quicer_supported({unix, darwin}) ->
-    %% no quic on macos so far
-    false;
-is_quicer_supported(_) ->
     not is_build_without("QUIC").
 
 is_rocksdb_supported() ->