diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-07-30 21:56:29 -0400 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-07-30 21:56:29 -0400 |
commit | e46b425a88fe80ba4949ad255b14e494a9fbd5d0 (patch) | |
tree | 3283f72aafe451a2bf4b3c34c73084af3e572758 | |
parent | b79ff420c96a531016b33724594b81ae8d6b3423 (diff) | |
parent | 4e966a6e676339c42a484bf484c91fd809b752eb (diff) |
Merge pull request #673 from tsloughter/sort_vsns
sort versions of packages in `rebar3 pkgs` output
-rw-r--r-- | src/rebar_prv_packages.erl | 6 |
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). |