|
44 | 44 | ZSTDFLAGS := -6
|
45 | 45 | endif
|
46 | 46 |
|
| 47 | +# Common paths to exclude from find commands, this rule is written so |
| 48 | +# that it can be it can be used in a chain of AND statements (meaning |
| 49 | +# you can simply write `find . $(FIND_EXCLUSIONS) -name thing-i-want`). |
| 50 | +# Note, all find statements should be written with `.` or `./path` as |
| 51 | +# the search path so that these exclusions match. |
| 52 | +FIND_EXCLUSIONS= \ |
| 53 | + -not \( \( -path '*/.git/*' -o -path './build/*' -o -path './vendor/*' -o -path './.coderv2/*' -o -path '*/node_modules/*' -o -path './site/out/*' \) -prune \) |
47 | 54 | # Source files used for make targets, evaluated on use.
|
48 |
| -GO_SRC_FILES = $(shell find . -not \( -path './.git/*' -o -path './build/*' -o -path './vendor/*' -o -path './.coderv2/*' -o -path './site/node_modules/*' -o -path './site/out/*' \) -type f -name '*.go') |
| 55 | +GO_SRC_FILES = $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.go') |
49 | 56 | # All the shell files in the repo, excluding ignored files.
|
50 |
| -SHELL_SRC_FILES = $(shell find . -not \( -path './.git/*' -o -path './build/*' -o -path './vendor/*' -o -path './.coderv2/*' -o -path './site/node_modules/*' -o -path './site/out/*' \) -type f -name '*.sh') |
| 57 | +SHELL_SRC_FILES = $(shell find . $(FIND_EXCLUSIONS) -type f -name '*.sh') |
51 | 58 |
|
52 | 59 | # All ${OS}_${ARCH} combos we build for. Windows binaries have the .exe suffix.
|
53 | 60 | OS_ARCHES := \
|
@@ -341,7 +348,7 @@ build/coder_helm_$(VERSION).tgz:
|
341 | 348 | --version "$(VERSION)" \
|
342 | 349 | --output "$@"
|
343 | 350 |
|
344 |
| -site/out/index.html: site/package.json $(shell find ./site -not -path './site/node_modules/*' -type f \( -name '*.ts' -o -name '*.tsx' \)) |
| 351 | +site/out/index.html: site/package.json $(shell find ./site $(FIND_EXCLUSIONS) -type f \( -name '*.ts' -o -name '*.tsx' \)) |
345 | 352 | ./scripts/yarn_install.sh
|
346 | 353 | cd site
|
347 | 354 | yarn build
|
@@ -447,7 +454,7 @@ provisionerd/proto/provisionerd.pb.go: provisionerd/proto/provisionerd.proto
|
447 | 454 | --go-drpc_opt=paths=source_relative \
|
448 | 455 | ./provisionerd/proto/provisionerd.proto
|
449 | 456 |
|
450 |
| -site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk -type f -name '*.go') |
| 457 | +site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go') |
451 | 458 | go run scripts/apitypings/main.go > site/src/api/typesGenerated.ts
|
452 | 459 | cd site
|
453 | 460 | yarn run format:types
|
|
0 commit comments