Skip to content

Commit b8df500

Browse files
committed
Add script to automate some of release process.
1 parent cd96ca0 commit b8df500

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

scripts/version-bump.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/bash
2+
3+
set -eu
4+
5+
# This script automates the "Version bump" section
6+
7+
version="$1"
8+
9+
if [[ -z $version ]]; then
10+
echo "Usage: must supply version as first argument" >&2
11+
exit 1
12+
fi
13+
14+
git switch -C "release-$version"
15+
sed -i -e "0,/^\[badges/{s/^version =.*/version = \"$version\"/}" Cargo.toml
16+
17+
msrv="$(grep -F rust-version Cargo.toml | sed -e 's/^rust-version= "\(.*\)"/\1/')"
18+
19+
sed -i -e "s/Note that rust version \*[0-9.]+\* or later/Note that rust version *$msrv* or later/" README.md
20+
21+
sed -i -e "s/^# Upcoming release/# $version/" CHANGELOG.md
22+

0 commit comments

Comments
 (0)