Class: Fastlane::Actions::DeviceImageSelectorCleanupAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/device_image_selector/actions/cleanup.rb

Class Method Summary collapse

Class Method Details

.authorsObject



19
20
21
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 19

def self.authors
  ["Mario Zimmermann"]
end

.available_optionsObject



32
33
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 32

def self.available_options
end

.descriptionObject



15
16
17
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 15

def self.description
  "Cleanup screenshot files after frameit"
end

.detailsObject



27
28
29
30
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 27

def self.details
  # Optional:
  "Deletes the screenshot files in the output directory which were previously selected and processed by frameit"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


35
36
37
38
39
40
41
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 35

def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end

.return_valueObject



23
24
25
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 23

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/device_image_selector/actions/cleanup.rb', line 7

def self.run(params)
  UI.message("Cleaning up device images...")

  Actions.lane_context[SharedValues::DEVICE_IMAGE_SELECTOR_FILES].split(",").each do |file|
    File.delete(file)
  end
end