This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
#!/usr/bin/env bash
# Bash script to prepare a release using git-cliff.
# Inspired by https://github.com/orhun/git-cliff/blob/main/release.sh
if["$#" -ne 1];then
echo"A version tag is required."
echo"Example: bash $0 1.5.0"
exit1
fi
VERSION_TAG=$1
# Update CHANGELOG.
git cliff --tag "$VERSION_TAG" -o CHANGELOG.md
# Add all changes and commit.
git add -A
git commit -m "🔖 chore(release): prepare for $VERSION_TAG"
# Template for the tag description.
exportGIT_CLIFF_TEMPLATE="\
{% for group, commits in commits | group_by(attribute=\"group\") %}\