Windows GitHub release hotfix

Improve id variable parsing and print release.json to catch error
This commit is contained in:
Zion Nimchuk 2020-08-15 17:44:08 -07:00 committed by Ani
parent c3709fa744
commit cd94d9849d
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ curl -s \
-H "Accept: application/vnd.github.v3+json" \
--data "$(generate_post_data)" "https://api.github.com/repos/$repo_full_name/releases" >> release.json
id=$(grep '"id"' release.json | cut -d ' ' -f4 | head -n1)
cat release.json
id=$(grep '"id"' release.json | cut -d ':' -f2 | head -n1 | awk '{$1=$1;print}')
id=${id%?}
echo ${id:?}