Skip to content

Commit

Permalink
Add script to automate some of release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmccombs committed May 6, 2024
1 parent cd96ca0 commit b8df500
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/version-bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/bash

set -eu

# This script automates the "Version bump" section

version="$1"

if [[ -z $version ]]; then
echo "Usage: must supply version as first argument" >&2
exit 1
fi

git switch -C "release-$version"
sed -i -e "0,/^\[badges/{s/^version =.*/version = \"$version\"/}" Cargo.toml

msrv="$(grep -F rust-version Cargo.toml | sed -e 's/^rust-version= "\(.*\)"/\1/')"

sed -i -e "s/Note that rust version \*[0-9.]+\* or later/Note that rust version *$msrv* or later/" README.md

sed -i -e "s/^# Upcoming release/# $version/" CHANGELOG.md

0 comments on commit b8df500

Please sign in to comment.