2021-06-16 22:43:45 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [ -n "$1" ]; then
|
2021-06-16 22:52:08 +03:00
|
|
|
cargo run -- --tag "$1" > CHANGELOG.md
|
2021-06-16 22:43:45 +03:00
|
|
|
git add -A && git commit -m "chore(release): prepare for $1"
|
2021-06-16 23:07:00 +03:00
|
|
|
changelog=$(cargo run -- --unreleased --strip all)
|
2021-06-16 22:43:45 +03:00
|
|
|
git -c user.name="git-cliff" \
|
|
|
|
-c user.email="git-cliff@protonmail.com" \
|
|
|
|
-c user.signingkey="1D2D410A741137EBC544826F4A92FA17B6619297" \
|
2021-06-16 23:14:27 +03:00
|
|
|
tag -s -a "$1" -m "Release $1\n\n${changelog//### /}"
|
2021-06-16 22:43:45 +03:00
|
|
|
fi
|