Check that packaging scripts are executable.

This commit is contained in:
Paul Chote 2018-09-08 00:28:37 +01:00
parent 509b685d16
commit 5d4e23f075
2 changed files with 26 additions and 3 deletions

View File

@ -17,11 +17,11 @@ script:
- . 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
if [ "${TRAVIS_TEST_PACKAGING}" == "True" ]; then make check-packaging-scripts && ./packaging/package-all.sh test-0 || travis_terminate 1; fi
before_deploy:
- mkdir build
- cd build && ../packaging/package-all.sh ${TRAVIS_TAG} ${PWD} && cd ..
- make check-packaging-scripts && cd build && ../packaging/package-all.sh ${TRAVIS_TAG} ${PWD} && cd ..
- . mod.config
deploy:

View File

@ -57,6 +57,29 @@ scripts:
exit 1; \
fi
check-packaging-scripts:
@if [ ! -x "packaging/package-all.sh" ] || [ ! -x "packaging/linux/buildpackage.sh" ] || [ ! -x "packaging/osx/buildpackage.sh" ] || [ ! -x "packaging/windows/buildpackage.sh" ]; then \
echo "Required SDK scripts are not executable:"; \
if [ ! -x "packaging/package-all.sh" ]; then \
echo " packaging/package-all.sh"; \
fi; \
if [ ! -x "packaging/linux/buildpackage.sh" ]; then \
echo " packaging/linux/buildpackage.sh"; \
fi; \
if [ ! -x "packaging/osx/buildpackage.sh" ]; then \
echo " packaging/osx/buildpackage.sh"; \
fi; \
if [ ! -x "packaging/windows/buildpackage.sh" ]; then \
echo " packaging/windows/buildpackage.sh"; \
fi; \
echo "Repair their permissions and try again."; \
echo "If you are using git you can repair these permissions by running"; \
echo " git update-index --chmod=+x *.sh"; \
echo "in the directories containing the affected files"; \
echo "and commiting the changed files to your repository."; \
exit 1; \
fi
variables:
@if [ -z "$(MOD_ID)" ] || [ -z "$(ENGINE_DIRECTORY)" ]; then \
echo "Required mod.config variables are missing:"; \
@ -122,4 +145,4 @@ check: utility stylecheck
test: utility
@echo "Testing $(MOD_ID) mod MiniYAML..."
@MOD_SEARCH_PATHS="$(MOD_SEARCH_PATHS)" mono --debug "$(ENGINE_DIRECTORY)/OpenRA.Utility.exe" $(MOD_ID) --check-yaml
@MOD_SEARCH_PATHS="$(MOD_SEARCH_PATHS)" mono --debug "$(ENGINE_DIRECTORY)/OpenRA.Utility.exe" $(MOD_ID) --check-yaml