Skip to content

Commit 7a8065b

Browse files
committed
fix
1 parent 0e52df3 commit 7a8065b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/config.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ function github_pr_exists(){ # github_pr_exists <repo-path> <branch-name>
134134
function github_release_id(){ # github_release_id <repo-path> <release-tag>
135135
local repo_path="$1"
136136
local release_tag="$2"
137-
local release=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases" | jq --arg release_tag "$release_tag" -r '.[] | select(.tag_name == "$release_tag") | .id'`
137+
local release=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases" | jq --arg release_tag "$release_tag" -r '.[] | select(.tag_name == $release_tag) | .id'`
138138
if [ ! "$release" == "" ] && [ ! "$release" == "null" ]; then echo "$release"; else echo ""; fi
139139
}
140140

141141
function github_release_asset_id(){ # github_release_asset_id <repo-path> <release-id> <release-file>
142142
local repo_path="$1"
143143
local release_id="$2"
144144
local release_file="$3"
145-
local release_asset=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases/$release_id/assets" | jq --arg release_file "$release_file" -r '.[] | select(.name == "$release_file") | .id'`
145+
local release_asset=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases/$release_id/assets" | jq --arg release_file "$release_file" -r '.[] | select(.name == $release_file) | .id'`
146146
if [ ! "$release_asset" == "" ] && [ ! "$release_asset" == "null" ]; then echo "$release_asset"; else echo ""; fi
147147
}
148148

0 commit comments

Comments
 (0)