From 99ccde2f2412a065a0c0847eb661e49ac357e2e5 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 21 Jul 2021 12:37:51 -0700 Subject: [PATCH] fix(mkreleaselog): match files anywhere in the path I had _thought_ pathspecs needed to start with / to only match the root, but apparently not. --- bin/mkreleaselog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/mkreleaselog b/bin/mkreleaselog index 64b81a16d..78a11b48a 100755 --- a/bin/mkreleaselog +++ b/bin/mkreleaselog @@ -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