fix: alternative route of getting latest Gitea version
https://gitea.com/gitea/gitea-mirror no longer exists, instead use https://dl.gitea.com/gitea/version.json. Simplifies logic.
This commit is contained in:
parent
9d001beba8
commit
cd95e73756
1 changed files with 1 additions and 2 deletions
|
|
@ -147,8 +147,7 @@ function download_gitea() {
|
|||
if ! test -f $DIR_BINARIES/gitea-$version; then
|
||||
mkdir -p $DIR_BINARIES
|
||||
if [[ $version =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||
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=$(curl -sS "https://dl.gitea.com/gitea/version.json" | jq -r '.latest.version')
|
||||
else
|
||||
full_version=$version
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue