Commit 74e81c59 authored by Austin Seipp's avatar Austin Seipp
Browse files

buck2: fix selection logic in update.sh



Didn't test this as well as I thought, I guess. Previously it would
return more than one result in the wrong order. Fixed now, so the latest
version is always picked up correctly.

Signed-off-by: default avatarAustin Seipp <aseipp@pobox.com>
parent e2519d12
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
{ "x86_64-linux": "sha256-dVOshrjpsFomstnJsZMPBDfakXOkU+ORbv//fq8Oxss="
, "x86_64-darwin": "sha256-BuzA8irlqLWnv5fGUdIHu0grz9smTBdOs5yTUBZLUKg="
, "aarch64-linux": "sha256-Thr9RsI7AkumBeraq08KoxDAXYKv63bZUTrTYN0GAss="
, "aarch64-darwin": "sha256-vRu0ra6YN7+o1AId6+v0ZLQucO84KwS3Ila6Ksmp1J0="
}
+5 −4
Original line number Diff line number Diff line
@@ -4,10 +4,11 @@
set -euo pipefail

VERSION=$(curl -s https://api.github.com/repos/facebook/buck2/releases \
  | jq -r '. |
           sort_by(.created_at) | .[] |
           select ((.prerelease == true) and (.name != "latest")) |
           .name')
  | jq -r 'sort_by(.created_at) | reverse |
           (map
             (select ((.prerelease == true) and (.name != "latest"))) |
             first
           ) | .name')
echo "Latest buck2 prerelease: $VERSION"

ARCHS=(