@@ -2,23 +2,7 @@ defmodule Matcha.MixProject do
2
2
use Mix.Project
3
3
4
4
@ version "VERSION" |> File . read! ( ) |> String . trim ( ) |> Version . parse! ( )
5
- @ erlang_version Path . join ( [
6
- :code . root_dir ( ) ,
7
- "releases" ,
8
- :erlang . system_info ( :otp_release ) ,
9
- "OTP_VERSION"
10
- ] )
11
- |> File . read! ( )
12
- |> String . trim ( )
13
- |> String . split ( "." )
14
- |> Stream . unfold ( fn
15
- [ ] -> nil
16
- [ head | tail ] -> { head , tail }
17
- end )
18
- |> Stream . concat ( Stream . repeatedly ( fn -> 0 end ) )
19
- |> Enum . take ( 3 )
20
- |> Enum . join ( "." )
21
- |> Version . parse! ( )
5
+ @ erlang_version :otp_release |> :erlang . system_info |> List . to_string ( ) |> String . to_integer ( )
22
6
23
7
@ name "Matcha"
24
8
@ description "First-class match specification and match patterns for Elixir"
@@ -163,8 +147,6 @@ defmodule Matcha.MixProject do
163
147
{ :benchee_html , "~> 1.0" , only: @ dev_envs , runtime: false } ,
164
148
{ :credo , "~> 1.6" , only: @ dev_envs , runtime: false } ,
165
149
{ :dialyxir , "~> 1.0" , only: @ dev_envs , runtime: false } ,
166
- { :erlex , "== 0.2.7-handoff" ,
167
- only: [ :dev , :test ] , runtime: false , allow_pre: true , override: true } ,
168
150
{ :doctor , "~> 0.21" , only: @ dev_envs , runtime: false } ,
169
151
{ :ex_doc , "~> 0.29" , only: @ dev_envs , runtime: false } ,
170
152
{ :excoveralls , "~> 0.18" , only: @ dev_envs }
@@ -321,7 +303,7 @@ defmodule Matcha.MixProject do
321
303
plt_file: { :no_warn , "priv/plts/dialyzer.plt" } ,
322
304
flags:
323
305
[ "-Wunmatched_returns" , :error_handling , :underspecs ] ++
324
- if Version . match? ( @ erlang_version , " < 25.0.0" ) do
306
+ if @ erlang_version < 25 do
325
307
[ :race_conditions ]
326
308
else
327
309
[ ]
0 commit comments