Skip to content

Commit 7e91caa

Browse files
committed
Properly escape JSON in github-release.sh
1 parent fc58ba2 commit 7e91caa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ response=$(exec_or_dry_run curl -L -s -w "\n%{http_code}" \
172172
-H 'Accept: application/vnd.github+json' \
173173
-H 'X-GitHub-Api-Version: 2022-11-28' \
174174
-H "Authorization: Bearer $GITHUB_API_TOKEN" \
175-
-d "{\"tag_name\":\"${TAG_NAME}\",\"name\":\"${releaseName}\",\"make_latest\":\"legacy\",\"body\":\"${releaseBody//$'\n'/\\n}\"}" \
175+
-d "{\"tag_name\":\"${TAG_NAME}\",\"name\":\"${releaseName}\",\"make_latest\":\"legacy\",\"body\":$(echo -En "$releaseBody" | jq -Rsaj .)}" \
176176
'https://api.github.com/repos/hibernate/hibernate-orm/releases')
177177

178178
if [ "$PUSH_CHANGES" == true ]; then

0 commit comments

Comments
 (0)