diff options
author | sommerfeld <sommerfeld@sommerfeld.dev> | 2024-04-24 15:56:47 +0100 |
---|---|---|
committer | sommerfeld <sommerfeld@sommerfeld.dev> | 2024-04-24 15:57:30 +0100 |
commit | e7ac6d5c92bfae1790a5742510ad86206f7b50b7 (patch) | |
tree | 59f092f2f6eac9defcee90b65709d6fa8505e168 | |
parent | 194c89a2f7eac835599c9829b3d6f828e2051733 (diff) | |
download | sentrum-e7ac6d5c92bfae1790a5742510ad86206f7b50b7.tar.gz sentrum-e7ac6d5c92bfae1790a5742510ad86206f7b50b7.tar.bz2 sentrum-e7ac6d5c92bfae1790a5742510ad86206f7b50b7.zip |
Add version bumping script
-rwxr-xr-x | utils/bump-version.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/utils/bump-version.sh b/utils/bump-version.sh new file mode 100755 index 0000000..408e585 --- /dev/null +++ b/utils/bump-version.sh @@ -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" |