install: fetch downloads from codeberg as github API is broken

This commit is contained in:
CJ van den Berg 2025-12-10 17:59:47 +01:00
parent f746a2a8ab
commit 9ad180db30
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -151,9 +151,9 @@ i386) arch="x86" ;;
esac
# get latest version tag from github releases api
version=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name)
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://codeberg.org/api/v1/repos/neurocyte/flow-nightly/releases/latest | jq -r .tag_name)
version=$(curl -s "https://api.github.com/repos/$repo/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" ] && {
@ -205,7 +205,8 @@ fi
if [ "$debug" -eq 1 ]; then
filename="$filename-debug"
fi
url="https://github.com/$repo/releases/download/$version/$filename.$ext"
# url="https://github.com/$repo/releases/download/$version/$filename.$ext"
url="https://codeberg.org/$repo/releases/download/$version/$filename.$ext"
tmp_path="$(mktemp -d "${TMPDIR:-/tmp}/flow-control-installer.XXXXXXXXX")"