Skip to content

Commit

Permalink
Fix conversion of git_subdir to git-subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
rlipscombe committed Sep 25, 2024
1 parent b8a27ab commit 28af677
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions core/deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,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 -> [];
Expand All @@ -459,16 +465,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(),
Expand Down

0 comments on commit 28af677

Please sign in to comment.