forked from Optum/kong-splunk-log
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 1.03 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
DEV_ROCKS = "lua-cjson 2.1.0" "kong 0.13.1" "luacov 0.12.0" "busted 2.0.rc12" "luacov-cobertura 0.2-1" "luacheck 0.20.0"
PROJECT_FOLDER = splunk-log
LUA_PROJECT = kong-splunk-log
setup:
cd $(PROJECT_FOLDER)
@for rock in $(DEV_ROCKS) ; do \
if luarocks list --porcelain $$rock | grep -q "installed" ; then \
echo $$rock already installed, skipping ; \
else \
echo $$rock not found, installing via luarocks... ; \
luarocks install $$rock; \
fi \
done;
check:
cd $(PROJECT_FOLDER)
@for rock in $(DEV_ROCKS) ; do \
if luarocks list --porcelain $$rock | grep -q "installed" ; then \
echo $$rock is installed ; \
else \
echo $$rock is not installed ; \
fi \
done;
install:
-@luarocks remove $(LUA_PROJECT)
cd $(PROJECT_FOLDER) && luarocks make
test:
cd $(PROJECT_FOLDER) && busted spec/ ${ARGS}
coverage:
cd $(PROJECT_FOLDER) && busted spec/ -c ${ARGS} && luacov && luacov-cobertura -o cobertura.xml
package:
cd $(PROJECT_FOLDER) && luarocks make --pack-binary-rock
lint:
cd $(PROJECT_FOLDER) && luacheck -q .