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: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp
2023-07-18 09:40:54 -05:00
parent e2519d12c8
commit 74e81c5926
2 changed files with 5 additions and 9 deletions
@@ -1,5 +0,0 @@
{ "x86_64-linux": "sha256-dVOshrjpsFomstnJsZMPBDfakXOkU+ORbv//fq8Oxss="
, "x86_64-darwin": "sha256-BuzA8irlqLWnv5fGUdIHu0grz9smTBdOs5yTUBZLUKg="
, "aarch64-linux": "sha256-Thr9RsI7AkumBeraq08KoxDAXYKv63bZUTrTYN0GAss="
, "aarch64-darwin": "sha256-vRu0ra6YN7+o1AId6+v0ZLQucO84KwS3Ila6Ksmp1J0="
}
@@ -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=(