Skip to content

Commit

Permalink
Fix curl errors for GH uploads with a large changelog (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 authored and nebularg committed Aug 21, 2019
1 parent 82e23cd commit 5f8ed29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2272,12 +2272,12 @@ if [ -z "$skip_zipfile" ]; then
release_id=$( curl -sS -H "Cache-Control: no-cache" "https://api.github.com/repos/$project_github_slug/releases/tags/$tag" | jq '.id // empty' )
if [ -n "$release_id" ]; then
echo "Updating GitHub release: https://github.com/$project_github_slug/releases/tag/$tag"
result=$( curl -sS --retry 3 --retry-delay 10 \
result=$( echo "$_gh_payload" | curl -sS --retry 3 --retry-delay 10 \
-w "%{http_code}" -o "$resultfile" \
-H "Cache-Control: no-cache" \
-H "Authorization: token $github_token" \
-X PATCH \
-d "$_gh_payload" \
-d @- \
"https://api.github.com/repos/$project_github_slug/releases/$release_id" ) &&
{
if [ "$result" = "200" ]; then
Expand All @@ -2297,11 +2297,11 @@ if [ -z "$skip_zipfile" ]; then
}
else
echo "Creating GitHub release: https://github.com/$project_github_slug/releases/tag/$tag"
result=$( curl -sS --retry 3 --retry-delay 10 \
result=$( echo "$_gh_payload" | curl -sS --retry 3 --retry-delay 10 \
-w "%{http_code}" -o "$resultfile" \
-H "Cache-Control: no-cache" \
-H "Authorization: token $github_token" \
-d "$_gh_payload" \
-d @- \
"https://api.github.com/repos/$project_github_slug/releases" ) &&
{
if [ "$result" = "201" ]; then
Expand Down

0 comments on commit 5f8ed29

Please sign in to comment.