From 0ef79d8cdb3ad8863aa863a5156f51c9252924f8 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Fri, 24 Jan 2025 10:17:04 +0000 Subject: [PATCH] tools: replace release script with cargo-release e.g. ``` cargo release --no-push --no-publish -x minor -p quiche ``` This can also be used for other crates in the repo by providing `-p `. --- Cargo.toml | 7 +++++++ tools/release.sh | 22 ---------------------- 2 files changed, 7 insertions(+), 22 deletions(-) delete mode 100755 tools/release.sh diff --git a/Cargo.toml b/Cargo.toml index 909fb8ab11..e3f7a33138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,13 @@ members = [ "apps", "h3i", "octets", "qlog", "quiche" ] exclude = [ "fuzz", "tools/http3_test" ] +[workspace.metadata.release] +pre-release-commit-message = "{{crate_name}}: release {{version}}" +consolidate-commits = false +tag-name = "{{version}}" +tag-message = "{{crate_name}} {{version}}" +publish = false + [profile.bench] debug = true diff --git a/tools/release.sh b/tools/release.sh deleted file mode 100755 index e315e3f6f0..0000000000 --- a/tools/release.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " >&2 - exit 1 -fi - -if [ -n "$(git status -s)" ]; then - echo "Working directory is dirty." - exit 2 -fi - -VERSION=$1 - -cargo package --package quiche - -sed -i "0,/^version/ s/version = \"\(.*\)\"/version = \"$VERSION\"/" quiche/Cargo.toml -git add quiche/Cargo.toml -git commit -m $VERSION -git tag -a $VERSION -m "quiche $VERSION" --sign