forked from goadesign/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (17 loc) · 669 Bytes
/
Copy pathMakefile
File metadata and controls
21 lines (17 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.PHONY: all test
# Search all directories to find ones containing a Makefile
DIRS := $(shell find . -type f -name Makefile -not -path "./Makefile" -exec dirname {} \;)
# Set the default version to "latest". Specify externally with make GOA_VERSION=<desired_version>
GOA_VERSION ?= latest
# Execute make in all identified directories
all:
@for dir in $(DIRS); do \
echo "Making in $$dir..."; \
(cd $$dir && go get -u goa.design/goa/v3@$(GOA_VERSION) && go mod tidy && make) || exit 1; \
done
# Execute "make test" in all identified directories
test:
@for dir in $(DIRS); do \
echo "Running tests in $$dir..."; \
(cd $$dir && make test) || exit 1; \
done