feat: notify config, refactor config load.

This commit is contained in:
tx7do
2023-10-26 16:46:14 +08:00
parent 6d18bc0ffe
commit e7883775ed
24 changed files with 1907 additions and 1177 deletions

35
Makefile Normal file
View 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