install: add fallback to codeberg to workaround github api rate limiting
This commit is contained in:
parent
77b458d4c2
commit
effc5999da
1 changed files with 8 additions and 5 deletions
|
|
@ -152,11 +152,14 @@ esac
|
||||||
|
|
||||||
# get latest version tag from github releases api
|
# 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://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name)
|
||||||
[ -z "$version" ] && {
|
[ -z "$version" ] || [ "$version" = "null" ] && {
|
||||||
version=$(curl -s https://git.flow-control.dev/api/v1/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" ] && {
|
[ -z "$version" ] || [ "$version" = "null" ] && {
|
||||||
echo "failed to fetch $title latest version from github or flow-control.dev"
|
version=$(curl -s https://git.flow-control.dev/api/v1/repos/$repo/releases/latest | jq -r .tag_name)
|
||||||
exit 1
|
[ -z "$version" ] || [ "$version" = "null" ] && {
|
||||||
|
echo "failed to fetch $title latest version from github, codeberg or flow-control.dev"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
title="$title $version"
|
title="$title $version"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue