@cryptotaxi247 / kubo / commits / 99ccde2f2

fix(mkreleaselog): match files anywhere in the path

I had _thought_ pathspecs needed to start with / to only match the root, but apparently not.

Steven Allen committed Jul 21, 2021 at 12:37 UTC 99ccde2f2412a065a0c0847eb661e49ac357e2e5
1 file changed +5 -2
bin/mkreleaselog
+5 -2
@@ -1,4 +1,7 @@
1 #!/bin/zsh
2 +#
3 +# Invocation: mkreleaselog [FIRST_REF [LAST_REF]]
4 +
5 set -euo pipefail
6 export GO111MODULE=on
7 export GOPATH="$(go env GOPATH)"
@@ -30,7 +33,7 @@ EXCLUDE_MODULES=(
33 "^github.com/marten-seemann/qtls"
34 )
35
33 -# Ignored files as git pathspecs.
36 +# Ignored files as git pathspecs. These patters will match any full path component.
37 IGNORE_FILES=(
38 ".gx"
39 "package.json"
@@ -60,7 +63,7 @@ fi
63
64 IGNORE_FILES_PATHSPEC=()
65 for f in "${IGNORE_FILES[@]}"; do
63 - IGNORE_FILES_PATHSPEC+=(":^:$f") # Prepend the magic "ignore this" sequence.
66 + IGNORE_FILES_PATHSPEC+=(":^:**/$f" ":^:$f") # Prepend the magic "ignore this" sequence.
67 done
68
69