fix: do not use api.github.com to avoid being rate limited
This commit is contained in:
parent
b12130646b
commit
6ce90814b2
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ function download_gitea() {
|
||||||
if ! test -f $DIR_BINARIES/gitea-$version; then
|
if ! test -f $DIR_BINARIES/gitea-$version; then
|
||||||
mkdir -p $DIR_BINARIES
|
mkdir -p $DIR_BINARIES
|
||||||
if [[ $version =~ ^[0-9]+\.[0-9]+$ ]]; then
|
if [[ $version =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||||
full_version=$(curl -sS "https://api.github.com/repos/go-gitea/gitea/releases?per_page=100" | jq -r '.[] | .tag_name | select(startswith("v'$version'"))' | grep -v -e '-rc' | sort --reverse --version-sort | head -1)
|
full_version=$(curl -sS "https://gitea.com/api/v1/repos/gitea/gitea-mirror/tags" | jq -r '.[] | .name | select(startswith("v'$version'"))' | grep -v -e '-rc' | sort --reverse --version-sort | head -1)
|
||||||
full_version=${full_version#v}
|
full_version=${full_version#v}
|
||||||
else
|
else
|
||||||
full_version=$version
|
full_version=$version
|
||||||
|
|
Loading…
Add table
Reference in a new issue