summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/changelog.sh4
-rwxr-xr-xtools/upgrade.sh8
2 files changed, 5 insertions, 7 deletions
diff --git a/tools/changelog.sh b/tools/changelog.sh
index 8753212e9..836afef14 100755
--- a/tools/changelog.sh
+++ b/tools/changelog.sh
@@ -91,6 +91,8 @@ function parse-commit {
if [[ "$body" =~ "BREAKING CHANGE: (.*)" || \
"$subject" =~ '^[^ :\)]+\)?!: (.*)$' ]]; then
message="${match[1]}"
+ # remove CR characters (might be inserted in GitHub UI commit description form)
+ message="${message//$'\r'/}"
# skip next paragraphs (separated by two newlines or more)
message="${message%%$'\n\n'*}"
# ... and replace newlines with spaces
@@ -284,7 +286,7 @@ function display-release {
local hash subject
for hash message in ${(kv)breaking}; do
- echo " - $(fmt:hash) $(fmt:subject "${message}")"
+ echo " - $(fmt:hash) $(fmt:scope)$(fmt:subject "${message}")"
done | sort
echo
}
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
index 4df7eb184..358242d0f 100755
--- a/tools/upgrade.sh
+++ b/tools/upgrade.sh
@@ -75,14 +75,10 @@ if git pull --rebase --stat origin master; then
# Display changelog with less if available, otherwise just print it to the terminal
if [[ "$1" = --interactive ]]; then
- if (( $+commands[less] )); then
- "$ZSH/tools/changelog.sh" HEAD "$last_commit" --text | LESS= command less -R
- else
- "$ZSH/tools/changelog.sh" HEAD "$last_commit"
- fi
+ "$ZSH/tools/changelog.sh" HEAD "$last_commit"
fi
- printf "${BLUE}%s \`${BOLD}%s${RESET}${BLUE}\`${RESET}\n" "You can see the changelog again with" "omz changelog"
+ printf "${BLUE}%s \`${BOLD}%s${RESET}${BLUE}\`${RESET}\n" "You can see the changelog with" "omz changelog"
fi
printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET