Merge pull request #8509 from thalesmg/no-rocksdb-raspbian

chore: do not include rocksdb on raspbian
This commit is contained in:
Thales Macedo Garitezi 2022-07-21 09:49:20 -03:00 committed by GitHub
commit a4f093675d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

10
mix.exs
View File

@ -622,8 +622,10 @@ defmodule EMQXUmbrella.MixProject do
end
defp enable_rocksdb?() do
not build_without_rocksdb?() or
"1" == System.get_env("BUILD_WITH_QUIC")
not Enum.any?([
build_without_rocksdb?(),
raspbian?()
]) or "1" == System.get_env("BUILD_WITH_ROCKSDB")
end
defp pkg_vsn() do
@ -655,6 +657,10 @@ defmodule EMQXUmbrella.MixProject do
{:unix, :darwin} == :os.type()
end
defp raspbian?() do
os_cmd("./scripts/get-distro.sh", []) =~ "raspbian"
end
defp build_without_jq?() do
opt = System.get_env("BUILD_WITHOUT_JQ", "false")

View File

@ -89,7 +89,8 @@ is_quicer_supported() ->
"1" == os:getenv("BUILD_WITH_QUIC").
is_rocksdb_supported() ->
not (false =/= os:getenv("BUILD_WITHOUT_ROCKSDB")) orelse
not (false =/= os:getenv("BUILD_WITHOUT_ROCKSDB") orelse
is_raspbian()) orelse
"1" == os:getenv("BUILD_WITH_ROCKSDB").
is_macos() ->
@ -105,6 +106,14 @@ is_centos_6() ->
false
end.
is_raspbian() ->
case os_cmd("./scripts/get-distro.sh") of
"raspbian" ++ _ ->
true;
_ ->
false
end.
is_win32() ->
win32 =:= element(1, os:type()).