#!/usr/bin/env bash set -e # Update changelog if ! command -v git-cliff &> /dev/null then echo "Please install git-cliff: https://github.com/orhun/git-cliff#installation" exit fi git-cliff --unreleased --tag $2 --prepend CHANGELOG.md ${EDITOR:-vi} CHANGELOG.md git commit CHANGELOG.md -m "docs(CHANGELOG): add entry for $2" # Update version cargo set-version ${2:1} cargo build --release git commit Cargo.toml Cargo.lock -m "chore(release): bump version to $2"