Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions scripts/releaser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,30 @@ set -e
function generate_changelog {
MERGED_PRS="$1"

echo
echo "## :warning: Breaking Changes"
echo
cat "${MERGED_PRS}" | grep "\!"

echo
echo "## :rocket: Features"
echo
cat "${MERGED_PRS}" | grep feat
cat "${MERGED_PRS}" | grep feat[:\(]

echo
echo "## :bug: Bug fixes"
echo
cat "${MERGED_PRS}" | grep fix
cat "${MERGED_PRS}" | grep fix[:\(]

echo
echo "## :memo: Documentation"
echo
cat "${MERGED_PRS}" | grep doc
cat "${MERGED_PRS}" | grep docs[:\(]

echo
echo "## :package: Others"
echo
cat "${MERGED_PRS}" | grep -v feat | grep -v fix | grep -v doc
cat "${MERGED_PRS}" | grep -v "\!" | grep -v feat[:\(] | grep -v fix[:\(] | grep -v docs[:\(]
}

function create_release {
Expand Down Expand Up @@ -66,7 +71,7 @@ if [ $# -ne 1 ]; then
echo
echo "To create a release: ./releaser.sh v0.17.0"
else
generate_changelog "${MERGED_PRS}" | gh release create "$1" -t "$1" -F -
generate_changelog "${MERGED_PRS}" | gh release create "$1" -t "$1" -p -F -
fi

rm -f "${MERGED_PRS}"
Loading