Check mod.config format in the Makefile.
This commit is contained in:
parent
471f0ef172
commit
d6d7cb22dc
@ -15,6 +15,7 @@ addons:
|
||||
script:
|
||||
- make
|
||||
- . mod.config;
|
||||
awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format: file must be saved using unix-style (CR, not CRLF) line endings.\n"; travis_terminate 1);
|
||||
if [ "${TRAVIS_TEST_MOD}" == "True" ]; then make test || travis_terminate 1; fi;
|
||||
if [ "${TRAVIS_TEST_PACKAGING}" == "True" ]; then ./packaging/package-all.sh test-0 || travis_terminate 1; fi
|
||||
|
||||
|
||||
7
Makefile
7
Makefile
@ -34,8 +34,11 @@ HAS_LUAC = $(shell command -v luac 2> /dev/null)
|
||||
LUA_FILES = $(shell find mods/*/maps/* -iname '*.lua')
|
||||
PROJECT_DIRS = $(shell dirname $$(find . -iname "*.csproj" -not -path "$(ENGINE_DIRECTORY)/*"))
|
||||
|
||||
scripts:
|
||||
@awk '/\r$$/ { exit(1); }' mod.config || (printf "Invalid mod.config format: file must be saved using unix-style (CR, not CRLF) line endings.\n"; exit 1)
|
||||
|
||||
variables:
|
||||
@if [ -z "$(MOD_ID)" ] || [ -z "$(ENGINE_DIRECTORY)" ];then \
|
||||
@if [ -z "$(MOD_ID)" ] || [ -z "$(ENGINE_DIRECTORY)" ]; then \
|
||||
echo "Required mod.config variables are missing:"; \
|
||||
if [ -z "$(MOD_ID)" ]; then \
|
||||
echo " MOD_ID"; \
|
||||
@ -47,7 +50,7 @@ variables:
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
engine: variables
|
||||
engine: variables scripts
|
||||
@./fetch-engine.sh || (printf "Unable to continue without engine files\n"; exit 1)
|
||||
@cd $(ENGINE_DIRECTORY) && make core
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user