-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (43 loc) · 1.07 KB
/
Makefile
File metadata and controls
51 lines (43 loc) · 1.07 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.PHONY: help
## help: 打印帮助信息
help:
@echo "使用说明:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed 's/^/ /'
## dev: 本地开发启动服务并监听文件变动
.PHONY: dev
dev: info
@watchexec -w src -w tests sh tests/make.sh watch
## tests: 单元测试
.PHONY: tests
tests: info
@watchexec -w src -w tests sh tests/make.sh tests
## cs: 代码优化
.PHONY: cs
cs: info
@echo '> Code style format'
@sh tests/make.sh cs
## check: 编码检查
.PHONY: check
check: info
@echo '> Code check'
@sh tests/make.sh check
## custom: 自定义命令,例如 composer
.PHONY: custom
custom: info
@sh tests/make.sh custom
## logs: 打印服务运行的实时日志
.PHONY: logs
logs: info
@sh tests/make.sh logs
## init: 复制配置文件模版
.PHONY: init
init: info
@echo 'init 复制配置文件模版:'
cp ./.deploy/local/application.yaml src/application.yaml
# 打印环境信息
info:
@echo "> 环境信息"
@echo 'basedir:' $(shell pwd)
@echo 'os: ' $(shell uname | awk '{print tolower($$0)}')
@echo 'arch: ' $(shell uname -m)
@echo ""