Skip to content

Commit

Permalink
Extract nif_versions to local variable
Browse files Browse the repository at this point in the history
Just for maintenance reasons, to make it easier to change it at some
point.
  • Loading branch information
paulgoetze committed Dec 23, 2023
1 parent 0b11673 commit 1bb466b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/mjml/native.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ defmodule Mjml.Native do
x86_64-unknown-linux-musl
)

nif_versions = ~w(
2.15
2.16
)

use RustlerPrecompiled,
otp_app: :mjml,
crate: "mjml_nif",
base_url: "#{github_url}/releases/download/v#{version}",
force_build: System.get_env("MJML_BUILD") in ["1", "true"],
version: version,
targets: targets,
nif_versions: ~w(2.15 2.16)
nif_versions: nif_versions

def to_html(_mjml, _render_options), do: error()
defp error(), do: :erlang.nif_error(:nif_not_loaded)
Expand Down

0 comments on commit 1bb466b

Please sign in to comment.