diff options
author | Loïc Hoguin <[email protected]> | 2018-12-31 11:12:04 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-12-31 11:12:04 +0100 |
commit | aaa94f3d42b16096893556e826214042b93d61b0 (patch) | |
tree | 163efa8df40b6fa1562d4eaecaecd86df6206547 /core | |
parent | b264034d2f1c02e037e8489fdc553ec57ab942de (diff) | |
download | erlang.mk-aaa94f3d42b16096893556e826214042b93d61b0.tar.gz erlang.mk-aaa94f3d42b16096893556e826214042b93d61b0.tar.bz2 erlang.mk-aaa94f3d42b16096893556e826214042b93d61b0.zip |
Add skeleton compatibility for semver versions
For now, ~> is expanded to a full version only.
Diffstat (limited to 'core')
-rw-r--r-- | core/deps.mk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/deps.mk b/core/deps.mk index e870de0..c81323a 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -325,13 +325,22 @@ define dep_autopatch_rebar.erl false end end, + SemVsn = fun + ("~> " ++ S) -> + case length([ok || $$. <- S]) of + 0 -> S ++ ".0.0"; + 1 -> S ++ ".0"; + _ -> S + end; + (S) -> S + end, fun() -> File = case lists:keyfind(deps, 1, Conf) of false -> []; {_, Deps} -> [begin case case Dep of N when is_atom(N) -> GetHexVsn(N); - {N, S} when is_atom(N), is_list(S) -> {N, {hex, S}}; + {N, S} when is_atom(N), is_list(S) -> {N, {hex, SemVsn(S)}}; {_, S, {pkg, N}} -> {N, {hex, S}}; {N, S} when is_tuple(S) -> {N, S}; {N, _, S} -> {N, S}; |