From 46cd5d8923306a6e5b6876f58f9f1785741ebc42 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 12 Jan 2021 13:15:29 +0100 Subject: [PATCH] tools: Allow versions to either have a v prefix or not Sometimes it's v0.9.3 and sometimes it's 0.9.3, and I always get it wrong. This is painful when you have to create a signed tag after committing to one of the two only to find out you chose wrong and have to redo the tagging. --- tools/build-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build-release.sh b/tools/build-release.sh index c96171782..25124e5ae 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -66,7 +66,7 @@ if [ "$VERSION" = "" ]; then fi # Skip 'v' here in $VERSION -MTIME=${FORCE_MTIME:-$(sed -n "s/^## \\[${VERSION#v}\\] - \\([-0-9]*\\).*/\\1/p" < CHANGELOG.md)} +MTIME=${FORCE_MTIME:-$(sed -n "s/^## \\[.*${VERSION#v}\\] - \\([-0-9]*\\).*/\\1/p" < CHANGELOG.md)} if [ -z "$MTIME" ]; then echo "No date found for $VERSION in CHANGELOG.md" >&2 exit 1