fix(ci): fix YAML syntax error in hotfix-branch-creation workflow

Fixed line 168 syntax error caused by sed command with backslash continuation.

Replaced:

  sed -i "1 a\\\

  \\

  $HOTFIX_ENTRY" "$CHANGELOG_PATH"

With simpler approach:

  - Extract title line

  - Extract body

  - Reconstruct file with hotfix entry inserted

This avoids YAML parsing issues with backslash escaping.
This commit is contained in:
Achintha Isuru
2026-03-05 15:38:14 -05:00
parent b8b39411fa
commit ac8891c43c

View File

@@ -172,10 +172,13 @@ jobs:
" "
# Insert after the first line (title) # Insert after the first line (title) using a temp file
sed -i "1 a\\ TITLE=$(head -n 1 "$CHANGELOG_PATH")
\\ BODY=$(tail -n +2 "$CHANGELOG_PATH")
$HOTFIX_ENTRY" "$CHANGELOG_PATH" echo "$TITLE" > "$CHANGELOG_PATH"
echo "" >> "$CHANGELOG_PATH"
echo "$HOTFIX_ENTRY" >> "$CHANGELOG_PATH"
echo "$BODY" >> "$CHANGELOG_PATH"
echo "✅ Added CHANGELOG entry for hotfix $HOTFIX_VERSION" echo "✅ Added CHANGELOG entry for hotfix $HOTFIX_VERSION"
else else