diff options
author | tv <tv@krebsco.de> | 2020-11-23 15:54:13 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2020-11-23 15:54:13 +0100 |
commit | 196db97f9e32c93a9b43f7ca71579db149dfea1b (patch) | |
tree | cb7a77b13e67218c5000237820dc8271f1463ef4 /tv/2configs | |
parent | 621c44e5f76390fe772656e56f0ef37c345c468d (diff) |
tv elm-package-proxy: list newest packages first
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/elm-packages-proxy.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tv/2configs/elm-packages-proxy.nix b/tv/2configs/elm-packages-proxy.nix index bc471a3..cc1e119 100644 --- a/tv/2configs/elm-packages-proxy.nix +++ b/tv/2configs/elm-packages-proxy.nix @@ -165,7 +165,6 @@ in { ;; 'POST /all-packages/since/'*) - # TODO only show newest? my_packages=$( cd ${cfg.packageDir} find -mindepth 3 -maxdepth 3 | @@ -174,7 +173,9 @@ in { map( select(.!="") | sub("^\\./(?<author>[^/]+)/(?<pname>[^/]+)/(?<version>[^/]+)$";"\(.author)/\(.pname)@\(.version)") - ) + ) | + sort_by(split("@") | [.[0]]+(.[1]|split("."))) | + reverse ' ) |