mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
Fix github release url (#916)
This commit is contained in:
parent
7dcb8c7436
commit
e85e1a7234
1 changed files with 2 additions and 2 deletions
|
@ -281,10 +281,10 @@ github_release() {
|
||||||
owner_repo=$1
|
owner_repo=$1
|
||||||
version=$2
|
version=$2
|
||||||
test -z "$version" && version="latest"
|
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")
|
json=$(http_copy "$giturl" "Accept:application/json")
|
||||||
test -z "$json" && return 1
|
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
|
test -z "$version" && return 1
|
||||||
echo "$version"
|
echo "$version"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue