forked from aserebryakov/trie-rs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add bash script to easily perform a release
- Loading branch information
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Check if version argument is provided | ||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 <new_version>" | ||
exit 1 | ||
fi | ||
new_version=$1 | ||
|
||
# Update changelog | ||
git cliff -o CHANGELOG.md | ||
|
||
# Update version in Cargo.toml | ||
sed -i "s/^version = \"[0-9]*\.[0-9]*\.[0-9]*\"\$/version = \"$new_version\"/" "Cargo.toml" | ||
|
||
# Create and push tag | ||
git tag -a v$new_version -m "v$new_version" | ||
|
||
git push origin v$new_version | ||
|
||
git cliff -o CHANGELOG.md | ||
|
||
gmsg "🎉 $new_version released" || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters