Skip to content

Commit 7d60542

Browse files
committed
Fix version detection
1 parent cd810e7 commit 7d60542

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

lib/bandit/native.ex

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ defmodule Bandit.Native do
66
crate: "bandit_native",
77
base_url: "https://github.com/moogle19/bandit_native/releases/download/v#{version}",
88
force_build: System.get_env("RUSTLER_PRECOMPILATION_BANDIT_NATIVE_BUILD") in ["1", "true"],
9+
mode: if(Mix.env() == :prod, do: :release, else: :debug),
910
version: version
1011

1112
def mask(_payload, _mask), do: :erlang.nif_error(:nif_not_loaded)

mix.exs

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
defmodule BanditNative.MixProject do
22
use Mix.Project
33

4+
@version "0.1.0"
5+
46
def project do
57
[
68
app: :bandit_native,
7-
version: "0.1.0",
8-
elixir: "~> 1.14",
9+
version: @version,
10+
elixir: "~> 1.9",
911
start_permanent: Mix.env() == :prod,
10-
deps: deps()
12+
deps: deps(),
13+
description: "Native functions for bandit",
14+
package: package()
1115
]
1216
end
1317

@@ -21,8 +25,18 @@ defmodule BanditNative.MixProject do
2125
# Run "mix help deps" to learn about dependencies.
2226
defp deps do
2327
[
24-
{:rustler, "~> 0.27"},
25-
{:rustler_precompiled, "~> 0.5"}
28+
{:rustler_precompiled, "~> 0.5"},
29+
{:rustler, ">= 0.0.0", optional: true}
30+
]
31+
end
32+
33+
defp package do
34+
[
35+
name: "bandit_native",
36+
maintainers: ["Kevin Seidel"],
37+
licenses: ["MIT"],
38+
links: %{"GitHub" => "https://github.com/moogle19/bandit_native"},
39+
files: ~w(.formatter.exs mix.exs README.md lib native checksum-*.exs)
2640
]
2741
end
2842
end

0 commit comments

Comments
 (0)