Skip to content

Instantly share code, notes, and snippets.

@swvitaliy
Created March 1, 2019 14:54
Show Gist options
  • Save swvitaliy/01f99c93099d58008fec3f4cb1b44e5a to your computer and use it in GitHub Desktop.
Save swvitaliy/01f99c93099d58008fec3f4cb1b44e5a to your computer and use it in GitHub Desktop.
#!/bin/bash
(
echo '# Changes'
echo ''
git log --first-parent --pretty=format:'%s' \
| grep -v '^update changelog' \
| perl -p -e 's/^((v?[0-9]+\.?)+)$/\n## \1\n/g' \
| perl -p -e 's/^([^#\s].*)$/* \1/g'
)> CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment