Skip to content

Commit

Permalink
Create release
Browse files Browse the repository at this point in the history
  • Loading branch information
ypo committed Mar 18, 2024
1 parent 301578e commit 561d358
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

if [ -z ${1} ]; then
current_version=$(cat Cargo.toml | grep '^version =' | awk '{print $3}' | tr -d '"')
IFS='.' read -r major minor patch <<< "$current_version"
((patch++))
version="$major.$minor.$patch"
else
version=$1
fi

cargo changelog --write flute || exit -1
cargo set-version $version || exit -1
git commit Cargo.toml CHANGELOG.md -m "release-$version"
git tag release-$version
git push
git push --tags

0 comments on commit 561d358

Please sign in to comment.