You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.9 KiB

  1. #!/bin/bash
  2. #nb: must be bash to support shopt globstar
  3. set -e
  4. shopt -s globstar
  5. if [ "$BUILD_TOOLS" = false ]; then
  6. if grep '"aaa" = \(.+\)' _maps/**/*.dmm; then
  7. echo "Non-TGM formatted map detected. Please convert it using Map Merger!"
  8. exit 1
  9. fi;
  10. if grep 'step_[xy]' _maps/**/*.dmm; then
  11. echo "step_[xy] variables detected in maps, please remove them."
  12. exit 1
  13. fi;
  14. if grep 'pixel_[xy] = 0' _maps/**/*.dmm; then
  15. echo "pixel_[xy] = 0 detected in maps, please review to ensure they are not dirty varedits."
  16. fi;
  17. if grep '\td[1-2] =' _maps/**/*.dmm; then
  18. echo "d[1-2] cable variables detected in maps, please remove them."
  19. exit 1
  20. fi;
  21. if grep '^/area/.+[\{]' _maps/**/*.dmm; then
  22. echo "Vareditted /area path use detected in maps, please replace with proper paths."
  23. exit 1
  24. fi;
  25. if grep '\W\/turf\s*[,\){]' _maps/**/*.dmm; then
  26. echo "base /turf path use detected in maps, please replace with proper paths."
  27. exit 1
  28. fi;
  29. if grep '^/*var/' code/**/*.dm; then
  30. echo "Unmanaged global var use detected in code, please use the helpers."
  31. exit 1
  32. fi;
  33. if grep -i 'centcomm' code/**/*.dm; then
  34. echo "Misspelling(s) of CENTCOM detected in code, please remove the extra M(s)."
  35. exit 1
  36. fi;
  37. if grep -i 'centcomm' _maps/**/*.dmm; then
  38. echo "Misspelling(s) of CENTCOM detected in maps, please remove the extra M(s)."
  39. exit 1
  40. fi;
  41. source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
  42. if [ "$BUILD_TESTING" = true ]; then
  43. tools/travis/dm.sh -DTRAVISBUILDING -DTRAVISTESTING -DALL_MAPS tgstation.dme
  44. else
  45. tools/travis/dm.sh -DTRAVISBUILDING tgstation.dme
  46. #config folder should not be mandatory
  47. rm -rf config/*
  48. #test config
  49. cp tools/travis/travis_config.txt config/config.txt
  50. DreamDaemon tgstation.dmb -close -trusted -verbose -params "test-run&log-directory=travis"
  51. cat data/logs/travis/clean_run.lk
  52. fi;
  53. fi;