fix(ci): resolve post-merge workflow heredoc parsing issue (#44)
The workflow was failing with 'before: command not found' because multiline commit messages were being inserted into a heredoc, causing shell parsing errors. Fixed by: - Using only commit title (first line) instead of full message body - Replacing heredoc with printf to avoid shell expansion issues - Properly escaping special characters in commit messages This fixes the version bump automation that was failing on PR #42 merge.
This commit is contained in:
parent
784ffadf92
commit
62f77343a0
1 changed files with 4 additions and 9 deletions
13
.github/workflows/post-merge.yml
vendored
13
.github/workflows/post-merge.yml
vendored
|
|
@ -111,16 +111,11 @@ jobs:
|
|||
|
||||
# Update CHANGELOG.md
|
||||
DATE=$(date +%Y-%m-%d)
|
||||
COMMIT_MSG=$(git log -1 --pretty=%B)
|
||||
# Get only the first line (title) of commit message to avoid multiline issues
|
||||
COMMIT_TITLE=$(git log -1 --pretty=%s)
|
||||
|
||||
# Create changelog entry
|
||||
cat > /tmp/changelog_entry.md << EOF
|
||||
## [$NEW_VERSION] - $DATE
|
||||
|
||||
### Changes
|
||||
- $COMMIT_MSG
|
||||
|
||||
EOF
|
||||
# Create changelog entry (use printf to avoid heredoc issues)
|
||||
printf "## [%s] - %s\n\n### Changes\n- %s\n\n" "$NEW_VERSION" "$DATE" "$COMMIT_TITLE" > /tmp/changelog_entry.md
|
||||
|
||||
# Prepend to CHANGELOG.md (after the header)
|
||||
if [ -f CHANGELOG.md ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue