Skip to content

Commit

Permalink
Fix github release url (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Jan 30, 2023
1 parent 7dcb8c7 commit e85e1a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ github_release() {
owner_repo=$1
version=$2
test -z "$version" && version="latest"
giturl="https://github.com/${owner_repo}/releases/${version}"
giturl="https://api.github.com/repos/${owner_repo}/releases/tags/${version}"
json=$(http_copy "$giturl" "Accept:application/json")
test -z "$json" && return 1
version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//')
version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name": *"//' | sed 's/".*//')
test -z "$version" && return 1
echo "$version"
}
Expand Down

0 comments on commit e85e1a7

Please sign in to comment.