Skip to content

Commit

Permalink
Make draft-release.sh compatible with old versions of bash (#6799)
Browse files Browse the repository at this point in the history
`${project^}` is not supported in older versions of macOS's default
shell, bash v3.2.

Signed-off-by: Quan Tian <[email protected]>
  • Loading branch information
tnqn authored Nov 11, 2024
1 parent e7e1410 commit b6d4238
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/release/draft-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit b6d4238

Please sign in to comment.