Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTO] [ RTI-14085 ] Update Dependencies #54

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
{project_plugins,
[{rebar3_hex, "~> 7.0.4"},
{rebar3_format, "~> 1.2.1"},
{rebar3_lint, "~> 2.0.1"},
{rebar3_lint, "~> 3.0.0"},
{rebar3_hank, "~> 1.3.0"},
{rebar3_sheldon, "~> 0.4.2"}]}.
16 changes: 8 additions & 8 deletions src/dep_updater.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ dep_name(Dep) when is_atom(Dep) ->
Dep.

%% @see rebar_app_utils:parse_dep/5.
update_dep(Dep = {_, _, {pkg, _}}, Opts) ->
update_dep({_, _, {pkg, _}} = Dep, Opts) ->
maybe_update_hex_dep(Dep, Opts);
update_dep(Dep = {_, {pkg, _}}, _Opts) ->
update_dep({_, {pkg, _}} = Dep, _Opts) ->
Dep; %% Already using the latest version
update_dep(Dep = {_, Vsn}, Opts) when is_list(Vsn); is_binary(Vsn) ->
update_dep({_, Vsn} = Dep, Opts) when is_list(Vsn); is_binary(Vsn) ->
maybe_update_hex_dep(Dep, Opts);
update_dep(Dep, _Opts) when is_atom(Dep); is_binary(Dep) ->
Dep; %% Already using the latest version
update_dep(Dep, #{just_hex := true}) ->
Dep;
update_dep(Dep = {Name, Source}, Opts) when is_tuple(Source) ->
update_dep({Name, Source} = Dep, Opts) when is_tuple(Source) ->
maybe_update_git_dep(Name, Source, Dep, Opts);
update_dep(Dep = {Name, _Vsn, Source}, Opts) when is_tuple(Source) ->
update_dep({Name, _Vsn, Source} = Dep, Opts) when is_tuple(Source) ->
maybe_update_git_dep(Name, Source, Dep, Opts);
update_dep(Dep = {Name, _Vsn, Source, RepoOpts}, Opts)
update_dep({Name, _Vsn, Source, RepoOpts} = Dep, Opts)
when is_tuple(Source), is_list(RepoOpts) ->
maybe_update_git_dep(Name, Source, Dep, Opts);
update_dep(Dep = {Name, Source, RepoOpts}, Opts)
update_dep({Name, Source, RepoOpts} = Dep, Opts)
when is_tuple(Source), is_list(RepoOpts) ->
maybe_update_git_dep(Name, Source, Dep, Opts);
update_dep(Dep, _Opts) ->
Expand Down Expand Up @@ -173,7 +173,7 @@ latest_version(Name, <<"v", Vsn/binary>>, <<"v", NewVsn/binary>>, Opts) ->
%% Special case that we use a lot
LatestVsn = latest_version(Name, Vsn, NewVsn, Opts),
<<"v", LatestVsn/binary>>;
latest_version(Name, <<"~> ", Vsn/binary>>, NewVsn, Opts = #{update_approx := true}) ->
latest_version(Name, <<"~> ", Vsn/binary>>, NewVsn, #{update_approx := true} = Opts) ->
%% Special case that we use a lot
LatestVsn = latest_version(Name, Vsn, NewVsn, Opts),
<<"~> ", LatestVsn/binary>>;
Expand Down