@@ -38,7 +38,10 @@ while IFS=: read -r downstream repo ref; do
3838 ref_pattern=" REF: ($ref )"
3939 replacement_pattern=" REF: {new_version}"
4040
41- # Run bump_dependency.py
41+ # Create a temporary file for this downstream's commit message
42+ TEMP_MSG_FILE=$( mktemp)
43+
44+ # Run bump_dependency.py with commit-message-fd redirected to the temp file
4245 python3 .github/bin/bump_dependency.py \
4346 --name " $downstream " \
4447 --repo-url " $repo_url " \
@@ -47,21 +50,22 @@ while IFS=: read -r downstream repo ref; do
4750 --current-version-pattern " $ref_pattern " \
4851 --update-pattern " $replacement_pattern " \
4952 --comment-pattern " $comment_pattern " \
50- $tag_args
53+ --commit-message-fd 3 \
54+ $tag_args 3< " $TEMP_MSG_FILE "
5155
52- # Check if this downstream had updates
53- if [ -f " $GITHUB_OUTPUT " ]; then
54- if grep -q " HAS_UPDATES=true" " $GITHUB_OUTPUT " ; then
55- HAS_ANY_UPDATES=true
56- # Extract commit message for this downstream
57- DOWNSTREAM_MSG=$( sed -n ' /COMMIT_MSG<<EOF/,/^EOF$/p' " $GITHUB_OUTPUT " | sed ' 1d;$d' )
58- if [ -n " $COMBINED_COMMIT_MSG " ]; then
59- COMBINED_COMMIT_MSG=" $COMBINED_COMMIT_MSG " $' \n\n ' " $DOWNSTREAM_MSG "
60- else
61- COMBINED_COMMIT_MSG=" $DOWNSTREAM_MSG "
62- fi
56+ # Check if this downstream had updates (commit message file has content)
57+ if [ -s " $TEMP_MSG_FILE " ]; then
58+ HAS_ANY_UPDATES=true
59+ DOWNSTREAM_MSG=$( cat " $TEMP_MSG_FILE " )
60+ if [ -n " $COMBINED_COMMIT_MSG " ]; then
61+ COMBINED_COMMIT_MSG=" $COMBINED_COMMIT_MSG " $' \n\n ' " $DOWNSTREAM_MSG "
62+ else
63+ COMBINED_COMMIT_MSG=" $DOWNSTREAM_MSG "
6364 fi
6465 fi
66+
67+ # Clean up temp file
68+ rm -f " $TEMP_MSG_FILE "
6569done <<< " $DOWNSTREAMS"
6670
6771# Set final outputs
0 commit comments