lib/snapshot/runner.rb in snapshot-1.11.1 vs lib/snapshot/runner.rb in snapshot-1.12.0
- old
+ new
@@ -12,11 +12,11 @@
def work
if File.exist?("./fastlane/snapshot.js") or File.exist?("./snapshot.js")
UI.error "Found old snapshot configuration file 'snapshot.js'"
UI.error "You updated to snapshot 1.0 which now uses UI Automation"
UI.error "Please follow the migration guide: https://github.com/fastlane/snapshot/blob/master/MigrationGuide.md"
- UI.error "And read the updated documentation: https://github.com/fastlane/snapshot"
+ UI.error "And read the updated documentation: https://github.com/fastlane/fastlane/tree/master/snapshot"
sleep 3 # to be sure the user sees this, as compiling clears the screen
end
Snapshot.config[:output_directory] = File.expand_path(Snapshot.config[:output_directory])
@@ -53,10 +53,12 @@
# Generate HTML report
ReportsGenerator.new.generate
# Clear the Derived Data
- FileUtils.rm_rf(TestCommandGenerator.derived_data_path)
+ unless Snapshot.config[:derived_data_path]
+ FileUtils.rm_rf(TestCommandGenerator.derived_data_path)
+ end
end
# This is its own method so that it can re-try if the tests fail randomly
# @return true/false depending on if the tests succeded
def run_for_device_and_language(language, locale, device, launch_arguments, retries = 0)