summaryrefslogtreecommitdiffstats
path: root/utils/bump-version.sh
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-06-28 14:53:43 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-06-28 14:53:43 +0100
commitef34f0bb4798a0d1410fffc974f084e4c6cfb920 (patch)
tree927965d3de187e2af5d594e6018b635a416ef6fb /utils/bump-version.sh
downloadviewercount-ef34f0bb4798a0d1410fffc974f084e4c6cfb920.tar.gz
viewercount-ef34f0bb4798a0d1410fffc974f084e4c6cfb920.tar.bz2
viewercount-ef34f0bb4798a0d1410fffc974f084e4c6cfb920.zip
Initial commit
Diffstat (limited to 'utils/bump-version.sh')
-rwxr-xr-xutils/bump-version.sh23
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"