Skip to content

Commit 6200043

Browse files
committed
chore: Fix makefile ignore when collecting files
Fixes an issue where the Makefile did not properly ignore files. Added the `worktrees/` directory to the `.gitignore` file. Modified Makefile to exclude files within `worktrees/` from Python, shell, and YAML file searches. Signed-off-by: Chmouel Boudjnah <[email protected]>
1 parent ebd538b commit 6200043

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Binaries for programs and plugins
2+
worktrees/
23
.gemini
34
*.exe
45
*.exe~

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ SHELL := bash
1616
TOPDIR := $(shell git rev-parse --show-toplevel)
1717
TMPDIR := $(TOPDIR)/tmp
1818
HUGO_BIN := $(TMPDIR)/hugo/hugo
19-
PY_FILES := $(shell find . -type f -regex ".*\.py" -not -regex ".*\.venv/.*" -print)
20-
SH_FILES := $(shell find hack/ -type f -regex ".*\.sh" -not -regex ".*\.venv/.*" -print)
21-
YAML_FILES := $(shell find . -not -regex '^./vendor/.*' -type f -regex ".*y[a]ml" -print)
22-
MD_FILES := $(shell find . -type f -regex ".*md" -not -regex '^./tmp/.*' -not -regex '^./vendor/.*' -not -regex ".*\.venv/.*" -not -regex '^./.vale/.*' -not -regex "^./docs/themes/.*" -not -regex "^./.git/.*" -print)
19+
PY_FILES := $(shell find . -type f -name "*.py" -not -path "./worktrees/*" -not -path "*/.venv/*" -print)
20+
SH_FILES := $(shell find hack/ -type f -name "*.sh" -not -path "./worktrees/*" -not -path "*/.venv/*" -print)
21+
YAML_FILES := $(shell find . -type f \( -name "*.yml" -o -name "*.yaml" \) -not -path "./.vale/*" -not -path "./docs/themes/hugo-book/.github/*" -not -path "./worktrees/*" -not -path "./vendor/*" -print)
22+
MD_FILES := $(shell find . -type f -name "*.md" -not -path "./tmp/*" -not -path "./vendor/*" -not -path "*/.venv/*" -not -path "./.vale/*" -not -path "./docs/themes/*" -not -path "./.git/*" -not -path "./worktrees/*" -print)
2323

2424
ifeq ($(PAC_VERSION),)
2525
PAC_VERSION="$(shell git describe --tags --exact-match 2>/dev/null || echo nightly-`date +'%Y%m%d'`-`git rev-parse --short HEAD`)"

0 commit comments

Comments
 (0)