Skip to content

Commit

Permalink
Add version bumping script
Browse files Browse the repository at this point in the history
  • Loading branch information
sommerfelddev committed Apr 24, 2024
1 parent 194c89a commit e7ac6d5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions utils/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#|/usr/bin/env sh

set -e

script_dir=$(dirname -- "$(readlink -f "$0")")
root_dir=$script_dir/..

cwd=$(pwd)
cd "$root_dir"

version=$(head -n 1 docs/CHANGELOG.md | cut -f 1 -d ' ')

sed -i -E 's/^version = .+$/version = "'"$version"'"/' Cargo.toml
cargo build
git add Cargo.toml Cargo.lock docs/CHANGELOG.md
git commit -m "Bump to v$version"
git tag -a v"$version" -m "$(utils/generate_changelog.sh)"

git push
git push mandibles
cargo publish

cd "$cwd"

0 comments on commit e7ac6d5

Please sign in to comment.