diff --git a/.travis.yml b/.travis.yml index 17e0641..8bfb7bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Makefile b/Makefile index 56b5e6c..50b6d8e 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file + @MOD_SEARCH_PATHS="$(MOD_SEARCH_PATHS)" mono --debug "$(ENGINE_DIRECTORY)/OpenRA.Utility.exe" $(MOD_ID) --check-yaml