aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-log-pretty-since.sh26
-rwxr-xr-xscripts/pvscheck.sh9
-rwxr-xr-xscripts/release.sh2
-rw-r--r--scripts/windows.ti4
4 files changed, 35 insertions, 6 deletions
diff --git a/scripts/git-log-pretty-since.sh b/scripts/git-log-pretty-since.sh
index 6281127542..a0aa4354b6 100755
--- a/scripts/git-log-pretty-since.sh
+++ b/scripts/git-log-pretty-since.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
-# Shows a log with changes grouped next to their merge-commit.
+# Prints a nicely-formatted commit history.
+# - Commits are grouped below their merge-commit.
+# - Issue numbers are moved next to the commit-id.
#
# Parameters:
# $1 "since" commit
@@ -19,14 +21,32 @@ is_merge_commit() {
git log $1^2 >/dev/null 2>&1 && return 0 || return 1
}
+# Removes parens from issue/ticket/PR numbers.
+#
+# Example:
+# in: 3340e08becbf foo (#9423)
+# out: 3340e08becbf foo #9423
+_deparen() {
+ sed 's/(\(\#[0-9]\{3,\}\))/\1/g'
+}
+
+# Cleans up issue/ticket/PR numbers in the commit descriptions.
+#
+# Example:
+# in: 3340e08becbf foo (#9423)
+# out: 3340e08becbf #9423 foo
+_format_ticketnums() {
+ nvim -Es +'g/\v(#[0-9]{3,})/norm! ngEldE0ep' +'%p' | _deparen
+}
+
for commit in $(git log --format='%H' --first-parent "$__SINCE"..HEAD); do
if is_merge_commit ${commit} ; then
if [ -z "$__INVMATCH" ] || ! git log --oneline ${commit}^1..${commit}^2 \
- | grep -E "$__INVMATCH" >/dev/null 2>&1 ; then
+ | >/dev/null 2>&1 grep -E "$__INVMATCH" ; then
git log -1 --oneline ${commit}
git log --format=' %h %s' ${commit}^1..${commit}^2
fi
else
git log -1 --oneline ${commit}
fi
-done
+done | _format_ticketnums
diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh
index 11b672c515..bf523b023a 100755
--- a/scripts/pvscheck.sh
+++ b/scripts/pvscheck.sh
@@ -8,6 +8,10 @@ set -e
# arguments provided.
test -z "$POSH_VERSION" && set -u
+log_info() {
+ >&2 printf "pvscheck.sh: %s\n" "$@"
+}
+
get_jobs_num() {
if [ -n "${TRAVIS:-}" ] ; then
# HACK: /proc/cpuinfo on Travis CI is misleading, so hardcode 1.
@@ -261,6 +265,11 @@ install_pvs() {(
cd "$tgt"
+ if test -d pvs-studio ; then
+ log_info 'install_pvs: "pvs-studio" directory already exists, skipping install'
+ return 0
+ fi
+
mkdir pvs-studio
cd pvs-studio
diff --git a/scripts/release.sh b/scripts/release.sh
index 66ffd3e6fe..1645a10452 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -67,7 +67,7 @@ _do_release_commit() {
if ! test "$ARG1" = '--use-current-commit' ; then
echo "Building changelog since ${__LAST_TAG}..."
- __CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:\S')"
+ __CHANGELOG="$(./scripts/git-log-pretty-since.sh "$__LAST_TAG" 'vim-patch:[^[:space:]]')"
git add CMakeLists.txt
git commit --edit -m "${__RELEASE_MSG} ${__CHANGELOG}"
diff --git a/scripts/windows.ti b/scripts/windows.ti
index da643350db..4f4832b786 100644
--- a/scripts/windows.ti
+++ b/scripts/windows.ti
@@ -27,7 +27,7 @@ win32con|ANSI emulation for libuv on legacy console,
conemu|ANIS X3.64 and Xterm 256 colors for ConEmu with libuv,
ccc@, mc5i@, xenl@, acsc@, rmacs@, smacs@, blink@, cbt@,
- cvvis@, cnorm=\E[?25h, dim@, flash@, hts@, initc@, invis@, is2@,
+ cvvis@, cnorm=\E[?25h, cud1=\E[B, dim@, flash@, hts@, initc@, invis@, is2@,
kf46@, kf47@, kf48@, kf49@, kf50@, kf51@, kf52@, kf53@, kf54@,
kf55@, kf56@, kf57@, kf58@, kf59@, kf60@, kf61@, kf62@, kf63@, kmous@,
mc0@, mc4@, mc5@, meml@, memu@, oc@, rmam@, rmcup=\E[?1049l,
@@ -49,7 +49,7 @@ conemu|ANIS X3.64 and Xterm 256 colors for ConEmu with libuv,
vtpcon|ANIS emulation for console virtual terminal sequence with libuv,
ccc@, mc5i@, xenl@, blink@, acsc=jjkkllmmnnqqttuuvvwwxx,
- cvvis@, dim@, flash@,
+ cvvis@, cud1=\E[B, dim@, flash@,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E,
invis@, is2=\E[!p\E[?3l,
kf46@, kf47@, kf48@, kf49@, kf50@, kf51@, kf52@, kf53@, kf54@,