-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
While working on #18845 and #18850, I noticed a few things that could be improved in the Rakefile:
- DRY how we load
Podfile.lock - We have tasks such as
testandcleanthat are redundant given our use of Fastlane. We should either remove them or make them run the appropriate Faslane lane under the hood.
Lines 216 to 224 in 2185a1e
| desc 'Run test suite' | |
| task test: [:dependencies] do | |
| xcodebuild(:build, :test) | |
| end | |
| desc 'Remove any temporary products' | |
| task :clean do | |
| xcodebuild(:clean) | |
| end |
- Same goes for this custom
xcodebuildcall. Fastlane can do this for us with extra parameter and safety checks.
Lines 732 to 743 in 2185a1e
| def xcodebuild(*build_cmds) | |
| cmd = 'xcodebuild' | |
| cmd += " -destination 'platform=iOS Simulator,name=iPhone 6s'" | |
| cmd += ' -sdk iphonesimulator' | |
| cmd += " -workspace #{XCODE_WORKSPACE}" | |
| cmd += " -scheme #{XCODE_SCHEME}" | |
| cmd += " -configuration #{xcode_configuration}" | |
| cmd += ' ' | |
| cmd += build_cmds.map(&:to_s).join(' ') | |
| cmd += ' | bundle exec xcpretty -f `bundle exec xcpretty-travis-formatter` && exit ${PIPESTATUS[0]}' unless ENV['verbose'] | |
| sh(cmd) | |
| end |
Also note that xcodebuild call will likely fail, because "iPhone 6s" is no longer one of the Simulator that ship with Xcode out of the box:
Reactions are currently unavailable
