From 4e966a6e676339c42a484bf484c91fd809b752eb Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Thu, 30 Jul 2015 20:20:06 -0500 Subject: sort versions of packages when printing --- src/rebar_prv_packages.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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). -- cgit v1.1