diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-11-09 18:07:34 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-11-14 11:12:28 +0300 |
commit | a64485296c0044a1d2fe824c4c7a4c064cab076a (patch) | |
tree | 78d6a9d08ced8b3f480c263a9341083a72a0d3c0 /Makefile | |
parent | 7d00dffb6eea4a22cd9abdd9eb2159f8315f1eba (diff) |
Makefile: Simplify finding Go sources
In the past, there were Go code files other than the generated ones in
the `proto/` directory. That's not the case nowadays anymore as we have
since moved code for Protobuf-related tooling into `tools/`.
Simplify the condition to find our Go sources to just exclude all Go
files located in `proto/`. While at it, convert the excludes for the
top-level `_build` and `ruby` directory to also use `-path` so that we
don't accidentally skip any directories in Go-related subdirectories
that happen to be called like this. And finally, drop the exclude for
the `vendor` folder that we don't use anymore.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -239,7 +239,7 @@ GITALY_PACKED_EXECUTABLES = $(filter %gitaly-hooks %gitaly-git2go %gitaly-ssh # All executables that should be installed. GITALY_INSTALLED_EXECUTABLES = $(filter-out ${GITALY_PACKED_EXECUTABLES}, ${GITALY_EXECUTABLES}) # Find all Go source files. -find_go_sources = $(shell find ${SOURCE_DIR} -type d \( -name ruby -o -name vendor -o -name testdata -o -name '_*' -o -path '*/proto/go/gitalypb' \) -prune -o -type f -name '*.go' -not -name '*.pb.go' -print | sort -u) +find_go_sources = $(shell find ${SOURCE_DIR} -type d \( -path "${SOURCE_DIR}/_*" -o -path "${SOURCE_DIR}/ruby" -o -path "${SOURCE_DIR}/proto" \) -prune -o -type f -name '*.go' -print | sort -u) # run_go_tests will execute Go tests with all required parameters. Its # behaviour can be modified via the following variables: |