feat: notify config, refactor config load.
This commit is contained in:
35
Makefile
Normal file
35
Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
# Not Support Windows
|
||||
|
||||
.PHONY: help wire conf ent build api openapi init all
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
IS_WINDOWS:=1
|
||||
endif
|
||||
|
||||
CURRENT_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
||||
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
SRCS_MK := $(foreach dir, app, $(wildcard $(dir)/*/*/Makefile))
|
||||
|
||||
# generate protobuf api go code
|
||||
api:
|
||||
buf generate
|
||||
|
||||
# show help
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Usage:"
|
||||
@echo " make [target]"
|
||||
@echo ""
|
||||
@echo 'Targets:'
|
||||
@awk '/^[a-zA-Z\-_0-9]+:/ { \
|
||||
helpMessage = match(lastLine, /^# (.*)/); \
|
||||
if (helpMessage) { \
|
||||
helpCommand = substr($$1, 0, index($$1, ":")-1); \
|
||||
helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \
|
||||
printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \
|
||||
} \
|
||||
} \
|
||||
{ lastLine = $$0 }' $(MAKEFILE_LIST)
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
Reference in New Issue
Block a user