summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-07-30 20:20:06 -0500
committerTristan Sloughter <t@crashfast.com>2015-07-30 20:20:42 -0500
commit4e966a6e676339c42a484bf484c91fd809b752eb (patch)
tree1d5434b413e842b5459ed3a7ebdc665947c4545e
parent7c46eea294ecce8338bee7e76a13a0390b7c5901 (diff)
sort versions of packages when printing
-rw-r--r--src/rebar_prv_packages.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_prv_packages.erl b/src/rebar_prv_packages.erl
index 8ba66de..9a40734 100644
--- a/src/rebar_prv_packages.erl
+++ b/src/rebar_prv_packages.erl
@@ -46,7 +46,11 @@ print_packages(Dict) ->
end, orddict:new(), Pkgs),
orddict:map(fun(Name, Vsns) ->
- VsnStr = join(Vsns, <<", ">>),
+ SortedVsns = lists:sort(fun(A, B) ->
+ ec_semver:lte(ec_semver:parse(A)
+ ,ec_semver:parse(B))
+ end, Vsns),
+ VsnStr = join(SortedVsns, <<", ">>),
io:format("~s:~n Versions: ~s~n~n", [Name, VsnStr])
end, SortedPkgs).