From 7cc74d1fd9fe10d671c240029660c0164e821db5 Mon Sep 17 00:00:00 2001 From: welpo Date: Sun, 4 Feb 2024 22:52:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20misc(CI):=20fix=20links=20in=20t?= =?UTF-8?q?ag=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don't think it's possible to override the preprocessors using an env variable. --- release | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/release b/release index 16676f42a..43f23d85d 100644 --- a/release +++ b/release @@ -92,20 +92,12 @@ export GIT_CLIFF__CHANGELOG__BODY=$(cat <<'EOF' EOF ) -# Same as cliff.toml, except we don't replace issue number with a link (which aren't clickable on tag descriptions). -export GIT_CLIFF__GIT__PREPROCESSORS=$(cat <<'EOF' -# Remove trailing whitespace. -{ pattern = ' +$', replace = "" }, -# Replace multiple spaces with a single space. -{ pattern = ' +', replace = " " }, -# Remove gitmoji, both actual UTF emoji and :emoji: -{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}\u{200D}]) *', replace = "" } -EOF -) - # Generate the tag description. changelog=$(git cliff --tag "$VERSION_TAG" --unreleased --strip all) +# Undo the pre_processing that adds PR links. +changelog=$(echo "$changelog" | sed -E 's/\[\#([0-9]+)\]\(https:\/\/github\.com\/welpo\/[^\/]+\/issues\/([0-9]+)\)/#\1/g') + # Create a signed and annotated tag. git tag -s -a "$VERSION_TAG" -m "Release $VERSION_TAG" -m "$changelog"