Skip to content

Commit f4f54fd

Browse files
committed
partially revert 194cb69
The REST API returned 4xx on unknown object but valid JSON body. As written originally, valid JSON was assumed (result queried on null). So revert back the original curl calls where acquiring JSON.
1 parent c833d1a commit f4f54fd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/scripts/create_continuous_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dir=$(dirname "$0")
99
. "$dir/json-common.sh"
1010

1111
sudo apt install jq
12-
URL=$(curl -Sf -H "Authorization: token $GITHUB_TOKEN" -X GET\
12+
URL=$(curl -S -H "Authorization: token $GITHUB_TOKEN" -X GET\
1313
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/continuous" |
1414
jq -r '.url')
1515
if [ "$URL" != null ]; then # release exists

.github/scripts/create_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ REPL_NL=':a;N;$!ba;s/\n/\\n/g'
2121
markdown_replaces='s/\\_/\\\\_/g;s/\\\*/\\\\*/g' # escape MD escape sequences
2222

2323
sudo apt install jq
24-
URL=$(curl -Sf -H "Authorization: token $GITHUB_TOKEN" -X GET\
24+
URL=$(curl -S -H "Authorization: token $GITHUB_TOKEN" -X GET\
2525
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/$TAG" |
2626
jq -r '.url')
2727
REQ=PATCH

.github/scripts/delete-asset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ n=-1; while n=$((n + 1)); [ "$n" -lt "$LEN" ]; do
2020
fi
2121
ID=$(jq ".[$n].id" "$JSON")
2222
JSON2=$(mktemp)
23-
STATUS=$(curl -Sf -H "Authorization: token $GITHUB_TOKEN" -X DELETE \
23+
STATUS=$(curl -S -H "Authorization: token $GITHUB_TOKEN" -X DELETE \
2424
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases/assets/$ID" \
2525
-w '%{http_code}' -o "$JSON2")
2626
check_errors "$JSON2"

0 commit comments

Comments
 (0)