-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
42 lines (32 loc) · 1.32 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
.PHONY: all_checks hardcode_string_check missing_translation_check missing_locale_key_check test test-ci local check_untracked_files
all_checks: hardcode_string_check missing_translation_check missing_locale_key_check
# Variables
ROCKSBIN := $(HOME)/.luarocks/bin
# Target for running the hardcoded string checker
hardcode_string_check:
@poetry run python .scripts/hardcode_string_check.py
# Target for running the missing translation checker
missing_translation_check:
@poetry run python .scripts/missing_translation_check.py
missing_locale_key_check:
@poetry run python .scripts/check_for_missing_locale_keys.py
test:
@rm -rf luacov-html && rm -rf luacov.*out && $(ROCKSBIN)/busted --coverage && $(ROCKSBIN)/luacov
test-ci:
@rm -rf luacov-html && rm -rf luacov.*out && $(ROCKSBIN)/busted --coverage -o=TAP && $(ROCKSBIN)/luacov
lua_deps:
@luarocks install busted --local
@luarocks install luacov --local
@luarocks install luacov-html --local
check_untracked_files:
@if [ -n "$$(git ls-files --others --exclude-standard)" ]; then \
echo "You have untracked files:"; \
git ls-files --others --exclude-standard; \
echo ""; \
echo "This may cause errors in game. Please stage or remove them."; \
exit 1; \
else \
echo "No untracked files."; \
fi
local: missing_locale_key_check check_untracked_files
@.release/local.sh -D