Skip to content

Commit

Permalink
Fix a bug with conditional compilation (#18)
Browse files Browse the repository at this point in the history
* Use match? instead of == to compare results of `Bundlex.get_target()`
  • Loading branch information
varsill authored Apr 5, 2024
1 parent fad0613 commit 2497b89
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker run -it membraneframeworklabs/docker_membrane

To use that plugin in your project, add the following line to your deps in `mix.exs`:
```
{:membrane_agora_plugin, "~> 0.2.2"}
{:membrane_agora_plugin, "~> 0.2.3"}
```

Run `mix deps.get`.
Expand Down
2 changes: 1 addition & 1 deletion lib/agora/agora_sink_native.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.Agora.Sink.Native do
@moduledoc false

if Bundlex.get_target() == %{os: "linux", architecture: "x86_64"} do
if match?(%{os: "linux", architecture: "x86_64"}, Bundlex.get_target()) do
use Unifex.Loader
end
end
2 changes: 1 addition & 1 deletion lib/agora/agora_source_native.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.Agora.Source.Native do
@moduledoc false

if Bundlex.get_target() == %{os: "linux", architecture: "x86_64"} do
if match?(%{os: "linux", architecture: "x86_64"}, Bundlex.get_target()) do
use Unifex.Loader
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.Agora.Mixfile do
use Mix.Project

@version "0.2.2"
@version "0.2.3"
@github_url "https://github.com/membraneframework/membrane_agora_plugin"

def project do
Expand Down

0 comments on commit 2497b89

Please sign in to comment.