Skip to content

Commit

Permalink
Add proper sorting to git ls-remote (#37)
Browse files Browse the repository at this point in the history
* Add proper sorting to git ls-remote

* Format

* Remove unneeded pieces
  • Loading branch information
elbrujohalcon authored Jun 28, 2022
1 parent 6fadfe2 commit fec05b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dep_updater.erl
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ maybe_update_hex_dep(Vsn, Package, Opts) ->
maybe_update_git_dep(Name, {git, Repo, {tag, Vsn}}, Dep, Opts) ->
GitCmd =
lists:flatten(
io_lib:format("git -c 'versionsort.suffix=-' ls-remote --refs --tags ~p '*.*.*'",
[Repo])),
io_lib:format("git -c ls-remote --sort=v:refname --refs --tags ~p '*.*.*'", [Repo])),
LatestVsn =
case rebar_utils:sh(GitCmd, [return_on_error]) of
{ok, ""} ->
Expand Down

0 comments on commit fec05b6

Please sign in to comment.