update cpmutil

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2026-06-01 23:20:51 -04:00
parent 060ebb8ad4
commit aff9a6cee1
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
6 changed files with 63 additions and 34 deletions

View file

@ -83,8 +83,13 @@ for pkg in $packages; do
echo "-- Package $PACKAGE"
# TODO(crueter): Support for Forgejo updates w/ forgejo_token
# Use gh-cli to avoid ratelimits lmao
TAGS=$(gh api --method GET "/repos/$REPO/tags")
# Use gh-cli to avoid ratelimits, if available
endpoint="/repos/$REPO/tags"
if command -v gh >/dev/null 2>&1; then
TAGS=$(gh api --method GET "$endpoint")
else
TAGS=$(curl -sfL "https://api.github.com$endpoint")
fi
# filter out some commonly known annoyances
# TODO add more