Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Make sure we're failing even though we pipe to xcpretty
  2. SHELL=/bin/bash -o pipefail -o errexit
  3. WORKING_DIR = ./
  4. THIRD_PARTY_DIR = $(WORKING_DIR)/ThirdParty
  5. SCHEME = Signal
  6. XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator
  7. SETUP_HOOK_PATH = $(HOME)/.ci/setup.sh
  8. .PHONY: build test retest clean dependencies
  9. default: test
  10. update_dependencies:
  11. bundle exec pod update
  12. carthage update --platform iOS
  13. setup:
  14. [ -x ${SETUP_HOOK_PATH} ] && ${SETUP_HOOK_PATH}
  15. rbenv install -s
  16. gem install bundler
  17. bundle install
  18. dependencies:
  19. cd $(WORKING_DIR) && \
  20. git submodule foreach --recursive git clean -xfd && \
  21. git submodule foreach --recursive git reset --hard && \
  22. git submodule update --init
  23. cd $(THIRD_PARTY_DIR) && \
  24. carthage build --platform iOS
  25. build: dependencies
  26. cd $(WORKING_DIR) && \
  27. $(XCODE_BUILD) build | bundle exec xcpretty
  28. test:
  29. bundle exec fastlane test
  30. clean: clean_carthage
  31. cd $(WORKING_DIR) && \
  32. $(XCODE_BUILD) clean | bundle exec xcpretty
  33. clean_carthage:
  34. cd $(THIRD_PARTY_DIR) && \
  35. rm -fr Carthage/Build
  36. # Migrating across swift versions requires me to run this sometimes
  37. clean_carthage_cache:
  38. rm -fr ~/Library/Caches/org.carthage.CarthageKit/