-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
26 lines (18 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(ARGS):;@:)
HELP_FUN = %help; while (<>) { /^([A-Za-z0-9_-]+)\s*:.*\#\#(?:@([A-Za-z0-9_-]+))?\s(.*)$$/ or next; push @{$$help{$$2 || "other"}}, [$$1, $$3]; $$width = length($$1) if length($$1) > $$width } print "\e[1;97m$(or $(HELP_NAME),$(notdir $(CURDIR)))\e[0m\n\n"; for $$category (sort keys %help) { print "\e[1;97m$$category\e[0m\n"; for $$entry (@{$$help{$$category}}) { printf " \e[1;32m%-*s\e[0m \e[90m%s\e[0m\n", $$width, $$entry->[0], $$entry->[1] } }
help: ##@other Show this help.
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
##@tests
test: ##@tests Run the test suite.
go test ./...
##@analysis
vet: ##@analysis Run Go vet.
go vet ./...
##@documentation
generate: ##@documentation Regenerate the documentation.
go -C docs run ./readme/main.go
docs-watch: ##@documentation Watch source changes and regenerate documentation.
sh docs/watcher.sh
test-integration: ##@tests Run integration tests: make test-integration [all|null|sync|workerpool|sqlite|redis|mysql|postgres|nats|sqs|rabbitmq].
INTEGRATION_BACKEND="$(or $(firstword $(ARGS)),all)" go -C integration test -tags=integration ./...