Check mod.config format in the Makefile.

This commit is contained in:
Paul Chote 2018-08-24 16:41:30 +00:00
parent 471f0ef172
commit d6d7cb22dc
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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