From b6d4238b1d4240f6040d396e2537f5edc4c2883a Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Mon, 11 Nov 2024 11:07:51 +0800 Subject: [PATCH] Make draft-release.sh compatible with old versions of bash (#6799) `${project^}` is not supported in older versions of macOS's default shell, bash v3.2. Signed-off-by: Quan Tian --- hack/release/draft-release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/release/draft-release.sh b/hack/release/draft-release.sh index 440ba58590c..743719541c8 100755 --- a/hack/release/draft-release.sh +++ b/hack/release/draft-release.sh @@ -85,7 +85,9 @@ major_minor_number="${release%.*}" branch="release-${major_minor_number}" tag="v${release}" project="${repo##*/}" -title="${project^} $tag" +# Capitalize the first letter of the project in the title. It doesn't use ${project^} as it's not supported in older +# versions of macOS's default shell, bash v3.2. +title="$(echo "${project:0:1}" | tr '[:lower:]' '[:upper:]')${project:1} $tag" changelog_url="https://github.com/$repo/raw/$branch/CHANGELOG/CHANGELOG-${major_minor_number}.md" echo "+++ Downloading changelog..."