CI: build release JSON with jq --rawfile (avoid ARG_MAX on large bodies
All checks were successful
Forgejo Release Builder / release (push) Successful in 3m30s
All checks were successful
Forgejo Release Builder / release (push) Successful in 3m30s
Huge changelog strings passed as jq --arg exceeded Linux exec argument limit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e89f342881
commit
7fab10c8ef
1 changed files with 26 additions and 22 deletions
|
|
@ -407,32 +407,36 @@ jobs:
|
|||
fork_delta_label="Fork delta vs ${UPSTREAM_REPO}@${UPSTREAM_REF} (${UPSTREAM_BASE})"
|
||||
fi
|
||||
|
||||
release_body="$(printf '%s\n' \
|
||||
"#### What's Changed" \
|
||||
"" \
|
||||
"##### New" \
|
||||
"" \
|
||||
"##### Improve" \
|
||||
"" \
|
||||
"##### Fix" \
|
||||
"" \
|
||||
"${commit_logs}" \
|
||||
"" \
|
||||
"##### Based on" \
|
||||
"" \
|
||||
"${fork_delta_label}" \
|
||||
"" \
|
||||
"${full_changelog}" \
|
||||
"" \
|
||||
"<!-->" \
|
||||
"> [!TIP]" \
|
||||
">" \
|
||||
"> ### If you are unsure which version to download then go with \`Komikku-universal.apk\`")"
|
||||
release_body_file="$(mktemp)"
|
||||
{
|
||||
printf '%s\n' \
|
||||
"#### What's Changed" \
|
||||
"" \
|
||||
"##### New" \
|
||||
"" \
|
||||
"##### Improve" \
|
||||
"" \
|
||||
"##### Fix" \
|
||||
"" \
|
||||
"${commit_logs}" \
|
||||
"" \
|
||||
"##### Based on" \
|
||||
"" \
|
||||
"${fork_delta_label}" \
|
||||
"" \
|
||||
"${full_changelog}" \
|
||||
"" \
|
||||
"<!-->" \
|
||||
"> [!TIP]" \
|
||||
">" \
|
||||
"> ### If you are unsure which version to download then go with \`Komikku-universal.apk\`"
|
||||
} > "${release_body_file}"
|
||||
|
||||
# Build JSON — body from file only (jq --arg body "$huge" hits ARG_MAX).
|
||||
"${JQ_BIN}" -n \
|
||||
--arg tag "${VERSION_TAG}" \
|
||||
--arg title "Komikku ${VERSION_DISPLAY}" \
|
||||
--arg body "${release_body}" \
|
||||
--rawfile body "${release_body_file}" \
|
||||
'{tag_name: $tag, name: $title, body: $body, draft: false, prerelease: false}' > "${payload_file}"
|
||||
|
||||
tag_path_enc="$("${JQ_BIN}" -nr --arg t "${VERSION_TAG}" '$t|@uri')"
|
||||
|
|
|
|||
Loading…
Reference in a new issue