fix(ci): resolve YAML syntax error on line 168 in hotfix workflow

Replaced multiline YAML string with heredoc approach to avoid quoting issues.
This commit is contained in:
Achintha Isuru
2026-03-05 15:41:54 -05:00
parent ac8891c43c
commit 7a185d6402

View File

@@ -162,24 +162,32 @@ jobs:
if [ -f "$CHANGELOG_PATH" ]; then if [ -f "$CHANGELOG_PATH" ]; then
DATE=$(date +%Y-%m-%d) DATE=$(date +%Y-%m-%d)
# Create hotfix entry # Create hotfix entry using cat with heredoc
HOTFIX_ENTRY="## [${HOTFIX_VERSION}] - ${DATE} - HOTFIX cat > /tmp/hotfix_entry.md << 'EOF'
## [${HOTFIX_VERSION}] - ${DATE} - HOTFIX
### Fixed ### Fixed
- ${ISSUE} - ${ISSUE}
--- ---
" EOF
# Insert after the first line (title) using a temp file # Replace variables in the temp file
sed -i.bak "s/\${HOTFIX_VERSION}/${HOTFIX_VERSION}/g" /tmp/hotfix_entry.md
sed -i.bak "s/\${DATE}/${DATE}/g" /tmp/hotfix_entry.md
sed -i.bak "s/\${ISSUE}/${ISSUE}/g" /tmp/hotfix_entry.md
# Insert after the first line (title)
TITLE=$(head -n 1 "$CHANGELOG_PATH") TITLE=$(head -n 1 "$CHANGELOG_PATH")
BODY=$(tail -n +2 "$CHANGELOG_PATH") BODY=$(tail -n +2 "$CHANGELOG_PATH")
echo "$TITLE" > "$CHANGELOG_PATH" echo "$TITLE" > "$CHANGELOG_PATH"
echo "" >> "$CHANGELOG_PATH" echo "" >> "$CHANGELOG_PATH"
echo "$HOTFIX_ENTRY" >> "$CHANGELOG_PATH" cat /tmp/hotfix_entry.md >> "$CHANGELOG_PATH"
echo "$BODY" >> "$CHANGELOG_PATH" echo "$BODY" >> "$CHANGELOG_PATH"
rm -f /tmp/hotfix_entry.md /tmp/hotfix_entry.md.bak
echo "✅ Added CHANGELOG entry for hotfix $HOTFIX_VERSION" echo "✅ Added CHANGELOG entry for hotfix $HOTFIX_VERSION"
else else
echo "⚠️ Warning: $CHANGELOG_PATH not found" echo "⚠️ Warning: $CHANGELOG_PATH not found"