diff options
author | Roger Lipscombe <[email protected]> | 2024-09-25 17:23:34 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2024-11-25 13:21:15 +0100 |
commit | a6ec895b5bc79510fedb6ed22565b48a0423e084 (patch) | |
tree | 7ab4d7f78e39b09a939c74bf6863538edb4288c9 /core | |
parent | c2b3ba6cc8f1fcc7e095f01ea34ae517167428dd (diff) | |
download | erlang.mk-a6ec895b5bc79510fedb6ed22565b48a0423e084.tar.gz erlang.mk-a6ec895b5bc79510fedb6ed22565b48a0423e084.tar.bz2 erlang.mk-a6ec895b5bc79510fedb6ed22565b48a0423e084.zip |
Fix conversion of git_subdir to git-subfolder
Fixes #1004
Diffstat (limited to 'core')
-rw-r--r-- | core/deps.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/deps.mk b/core/deps.mk index d48ab60..d557957 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -450,6 +450,12 @@ define dep_autopatch_rebar.erl GetHexVsn3Common(N, NP, S0); (N, NP, S) -> {N, {hex, NP, S}} end, + ConvertCommit = fun + ({branch, C}) -> C; + ({ref, C}) -> C; + ({tag, C}) -> C; + (C) -> C + end, fun() -> File = case lists:keyfind(deps, 1, Conf) of false -> []; @@ -465,16 +471,15 @@ define dep_autopatch_rebar.erl _ -> false end of false -> ok; + {Name, {git_subdir, Repo, Commit, SubDir}} -> + Write(io_lib:format("DEPS += ~s\ndep_~s = git-subfolder ~s ~s ~s~n", [Name, Name, Repo, ConvertCommit(Commit), SubDir])); {Name, Source} -> {Method, Repo, Commit} = case Source of {hex, NPV, V} -> {hex, V, NPV}; {git, R} -> {git, R, master}; - {M, R, {branch, C}} -> {M, R, C}; - {M, R, {ref, C}} -> {M, R, C}; - {M, R, {tag, C}} -> {M, R, C}; {M, R, C} -> {M, R, C} end, - Write(io_lib:format("DEPS += ~s\ndep_~s = ~s ~s ~s~n", [Name, Name, Method, Repo, Commit])) + Write(io_lib:format("DEPS += ~s\ndep_~s = ~s ~s ~s~n", [Name, Name, Method, Repo, ConvertCommit(Commit)])) end end || Dep <- Deps] end end(), |