fix(mkreleaselog): match files anywhere in the path

I had _thought_ pathspecs needed to start with / to only match the root,
but apparently not.
This commit is contained in:
Steven Allen 2021-07-21 12:37:51 -07:00
parent 8fca584a3c
commit 99ccde2f24

View File

@ -1,4 +1,7 @@
#!/bin/zsh
#
# Invocation: mkreleaselog [FIRST_REF [LAST_REF]]
set -euo pipefail
export GO111MODULE=on
export GOPATH="$(go env GOPATH)"
@ -30,7 +33,7 @@ EXCLUDE_MODULES=(
"^github.com/marten-seemann/qtls"
)
# Ignored files as git pathspecs.
# Ignored files as git pathspecs. These patters will match any full path component.
IGNORE_FILES=(
".gx"
"package.json"
@ -60,7 +63,7 @@ fi
IGNORE_FILES_PATHSPEC=()
for f in "${IGNORE_FILES[@]}"; do
IGNORE_FILES_PATHSPEC+=(":^:$f") # Prepend the magic "ignore this" sequence.
IGNORE_FILES_PATHSPEC+=(":^:**/$f" ":^:$f") # Prepend the magic "ignore this" sequence.
done