forked from saks/lua-resty-repl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
52 lines (36 loc) · 1.3 KB
/
Makefile
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
52
DST_DIR = lua-resty-console
NGINX_PATH = /usr/local/opt/openresty/nginx/sbin:/usr/local/openresty/nginx/sbin:${PATH}
DOCKER_IMAGE = nickxiao/openresty-testsuite
all: lint test
lint:
docker-compose run --rm app luacheck .
build_image:
docker build -t ${DOCKER_IMAGE}:latest -f Dockfile .
push_image:
docker push ${DOCKER_IMAGE}:latest
pull_image:
docker pull ${DOCKER_IMAGE}:latest
test: test_openresty test_luajit_integrational
test_openresty:
@echo OPENRESTY:
@docker-compose run --rm app sh -c 'resty-busted spec'
test_luajit_integrational:
@echo LUAJIT INTEGRATIONAL:
@docker-compose run --rm app sh -c 'bin/test_with_expect'
shell:
docker-compose run --rm app
demo:
docker-compose run --rm app sh -c 'mkdir -p logs && \
export LUA_PATH="/lua-resty-console/lib/?.lua;;" && \
nginx -p /lua-resty-console -c conf/nginx.conf && \
luajit lib/resty/console/client.lua localhost:80'
sync:
time (for d in expect/ spec/ .luacheckrc docker-compose.yml lib/ Makefile lua/ bin/ conf/; do rsync -rP $$d $(TARGET):$(DST_DIR)/$$d & done; wait)
run:
PATH=$(NGINX_PATH) nginx -p ${PWD} -c conf/nginx.conf
kill:
kill `cat logs/nginx.pid` || echo
log:
tail -f logs/error.log
.PHONY: lint test shell repl build push_images test_openresty \
test_luajit_integrational