From 47c5c80433f5e78db77a2d4ed45f453448766c1d Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 18 Dec 2020 11:35:39 +0100 Subject: [PATCH] docs/release: Only choose crate name not bench name (#1897) Some `Cargo.toml` files contain multiple `name` fields, e.g. the crate name and the benchmark name (see https://github.com/libp2p/rust-libp2p/blob/master/core/Cargo.toml). Only choose the first one when constructing the tag. --- docs/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release.md b/docs/release.md index 09b14aa7..d6abd333 100644 --- a/docs/release.md +++ b/docs/release.md @@ -25,7 +25,7 @@ documentation will refer to `X.Y.Z` as _major_, _minor_ and _patch_ version. ```bash cd $CRATE-PATH - tag="$(sed -En 's/^name = \"(.*)\"$/\1/p' Cargo.toml)-$(sed -En 's/^version = \"(.*)\"$/\1/p' Cargo.toml)" + tag="$(sed -En 's/^name = \"(.*)\"$/\1/p' Cargo.toml | head -n 1)-$(sed -En 's/^version = \"(.*)\"$/\1/p' Cargo.toml)" # Use `-s` for a GPG signed tag or `-a` for an annotated tag. git tag -s "${tag}" -m "${tag}" git push origin "${tag}"