misc: update release.sh

This commit is contained in:
Peter F. Patel-Schneider 2021-04-18 08:04:51 -04:00
parent f5fac6f713
commit 44b1b5b6d0
1 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,9 @@ body() {
EOF EOF
} }
echo 'Creating github release...' echo 'Creating github release...'
[ -z "$DRY_RUN" ] && url=$(curl -X POST --data "$(body)" "https://api.github.com/repos/$repo/releases?access_token=$github_token" 2>/dev/null | jq -r .html_url) ##[ -z "$DRY_RUN" ] && url=$(curl -X POST --data "$(body)" "https://api.github.com/repos/$repo/releases?access_token=$github_token" 2>/dev/null | jq -r .html_url)
[ -z "$DRY_RUN" ] && url=$(curl -H 'Authorization: $github_token' -X POST --data "$(body)" "https://api.github.com/repos/$repo/releases" 2>/dev/null | jq -r .html_url)
[ -z "$DRY_RUN" ] && [ -z "$url" ] && echo -e '\nError: Failed to create a github release' && exit 1 [ -z "$DRY_RUN" ] && [ -z "$url" ] && echo -e '\nError: Failed to create a github release' && exit 1
[ -z "$DRY_RUN" ] && echo -e "\nRelease created: $url" [ -z "$DRY_RUN" ] && echo -e "\nRelease created: $url"