Makefile 1016 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. .PHONY: build test retest clean dependencies
  8. default: test
  9. update_dependencies:
  10. bundle exec pod update
  11. carthage update --platform iOS
  12. setup:
  13. rbenv install -s
  14. gem install bundler
  15. bundle install
  16. dependencies:
  17. cd $(WORKING_DIR) && \
  18. git submodule update --init
  19. cd $(THIRD_PARTY_DIR) && \
  20. carthage build --platform iOS
  21. build: dependencies
  22. cd $(WORKING_DIR) && \
  23. $(XCODE_BUILD) build | xcpretty
  24. test:
  25. bundle exec fastlane test
  26. clean: clean_carthage
  27. cd $(WORKING_DIR) && \
  28. $(XCODE_BUILD) clean | xcpretty
  29. clean_carthage:
  30. cd $(THIRD_PARTY_DIR) && \
  31. rm -fr Carthage/Build
  32. # Migrating across swift versions requires me to run this sometimes
  33. clean_carthage_cache:
  34. rm -fr ~/Library/Caches/org.carthage.CarthageKit/