From effc5999dab836fe7c32fe22317af5f7ade1cc7a Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 2 Dec 2025 09:57:24 +0100 Subject: [PATCH] install: add fallback to codeberg to workaround github api rate limiting --- assets/install | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/install b/assets/install index d8ac2c0..d685d9c 100644 --- a/assets/install +++ b/assets/install @@ -152,11 +152,14 @@ esac # get latest version tag from github releases api version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name) -[ -z "$version" ] && { - version=$(curl -s https://git.flow-control.dev/api/v1/repos/$repo/releases/latest | jq -r .tag_name) - [ -z "$version" ] && { - echo "failed to fetch $title latest version from github or flow-control.dev" - exit 1 +[ -z "$version" ] || [ "$version" = "null" ] && { + version=$(curl -s https://codeberg.org/api/v1/repos/neurocyte/flow-nightly/releases/latest | jq -r .tag_name) + [ -z "$version" ] || [ "$version" = "null" ] && { + version=$(curl -s https://git.flow-control.dev/api/v1/repos/$repo/releases/latest | jq -r .tag_name) + [ -z "$version" ] || [ "$version" = "null" ] && { + echo "failed to fetch $title latest version from github, codeberg or flow-control.dev" + exit 1 + } } } title="$title $version"