Skip to content

Commit

Permalink
bump semver
Browse files Browse the repository at this point in the history
trinhminhtriet committed Nov 8, 2024
1 parent e976a0c commit 7eb3d9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/release-version.sh
Original file line number Diff line number Diff line change
@@ -5,14 +5,15 @@ set -xe

current_version="$(grep '^version = ' Cargo.toml | head -1 | cut -d '"' -f2)"
new_version="$1"
semver="${new_version#v}"

if [ -z "$new_version" ]; then
echo "New version required as argument"
exit 1
fi

echo ">>> Bumping version"
sed -i.bak "s/version = \"$current_version\"/version = \"$new_version\"/" Cargo.toml
sed -i.bak "s/version = \"$current_version\"/version = \"$semver\"/" Cargo.toml
rm Cargo.toml.bak

echo ">>> Running tests"

0 comments on commit 7eb3d9d

Please sign in to comment.