Class: Fastlane::Actions::ResetsimsAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::ResetsimsAction
- Defined in:
- lib/fastlane/plugin/resetsims/actions/resetsims_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(options) ⇒ Object
Class Method Details
.authors ⇒ Object
21 22 23 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 21 def self. ["Luís Esteves"] end |
.available_options ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 34 def self. [ FastlaneCore::ConfigItem.new(key: :devices_regexp, description: "regexp indicating the target devices", optional: true, default_value: "") ] end |
.description ⇒ Object
17 18 19 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 17 def self.description "Makes an reset on xcode simulators" end |
.details ⇒ Object
29 30 31 32 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 29 def self.details # Optional: "Makes an reset on xcode simulators" end |
.is_supported?(platform) ⇒ Boolean
43 44 45 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 43 def self.is_supported?(platform) platform == :ios end |
.return_value ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 25 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fastlane/plugin/resetsims/actions/resetsims_action.rb', line 4 def self.run() if [:devices_regexp].empty? device_list_grep = "" else device_list_grep = " | grep '#{[:devices_regexp]}'" end Actions.sh "instruments -s devices #{device_list_grep} | grep \"(\\d*.\\d)\\|(\\d*.\\d.\\d)\" | grep -o \"[0-9A-F]\\{8\\}-[0-9A-F]\\{4\\}-[0-9A-F]\\{4\\}-[0-9A-F]\\{4\\}-[0-9A-F]\\{12\\}\" | while read -r line ; do echo \"Resetting Simulator with UDID: $line\" xcrun simctl erase $line done" end |