Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add Course Module #34

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ CMD = $(DIR)/cmd
CONFIG_PATH = $(DIR)/config
IDL_PATH = $(DIR)/idl
OUTPUT_PATH = $(DIR)/output
API_PATH= $(DIR)/cmd/api

# 服务名
SERVICES := api user classroom
SERVICES := api user classroom course
service = $(word 1, $@)

PREFIX = "[Makefile]"
Expand Down Expand Up @@ -79,9 +80,8 @@ kitex-update-%:
# TODO: 这个和 Kitex 的区别在于这个 update 实际上做了 gen 的工作,就直接这么用了
.PHONY: hertz-gen-api
hertz-gen-api:
hz model -idl ./idl/api.thrift --out_dir ./cmd/api && \
hz update -idl ./idl/api.thrift --out_dir ./cmd/api --use ${MODULE}/cmd/api/biz/model && \
swag init --dir ./cmd/api --output ./docs/swagger --outputTypes "yaml"
cd ${API_PATH}; \
hz update -idl ${IDL_PATH}/api.thrift

# 单元测试
.PHONY: test
Expand Down Expand Up @@ -111,7 +111,7 @@ $(SERVICES):
else \
echo "$(PREFIX) Build $(service) target..."; \
mkdir -p output; \
cd $(CMD)/$(service) && sh build.sh; \
cd $(CMD)/$(service) && bash build.sh; \
renbaoshuo marked this conversation as resolved.
Show resolved Hide resolved
cd $(CMD)/$(service)/output && cp -r . $(OUTPUT_PATH)/$(service); \
echo "$(PREFIX) Build $(service) target completed"; \
fi
Expand All @@ -127,7 +127,7 @@ ifndef BUILD_ONLY
tmux select-layout -t "fzuhelper-$(service)" even-horizontal; \
fi
@echo "$(PREFIX) Running $(service) service in tmux..."
@tmux send-keys -t fzuhelper-$(service).0 'sh ./hack/entrypoint.sh $(service)' C-m
@tmux send-keys -t fzuhelper-$(service).0 'bash ./hack/entrypoint.sh $(service)' C-m
@tmux select-pane -t fzuhelper-$(service).1
endif

Expand Down
69 changes: 69 additions & 0 deletions cmd/api/biz/handler/api/course_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading