Class: Fastlane::Actions::RemoveFileAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::RemoveFileAction
- Defined in:
- lib/fastlane/plugin/rearchive/actions/remove_file_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/rearchive/actions/remove_file_action.rb', line 29 def self. ["naoigcat"] end |
.available_options ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fastlane/plugin/rearchive/actions/remove_file_action.rb', line 33 def self. [ FastlaneCore::ConfigItem.new(key: :archive_path, description: "The path of the .ipa or .xcarchive to be modified", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :files, description: "Files that should be removed", optional: false, type: Array) ] end |
.description ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/rearchive/actions/remove_file_action.rb', line 25 def self.description "Remove files inside .ipa/.xcarchive" end |
.is_supported?(platform) ⇒ Boolean
47 48 49 |
# File 'lib/fastlane/plugin/rearchive/actions/remove_file_action.rb', line 47 def self.is_supported?(platform) [:ios].include?(platform) end |
.run(params) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fastlane/plugin/rearchive/actions/remove_file_action.rb', line 9 def self.run(params) archive_path = File.(params[:archive_path]) raise "Archive path #{archive_path} does not exist" unless File.exist?(archive_path) if File.directory?(archive_path) archive = RearchiveHelper::XCArchive.new(archive_path) else archive = RearchiveHelper::IPAArchive.new(archive_path) end params[:files].each do |file| FastlaneCore::UI.("Deleting #{file}") relative_path = archive.app_path(file) archive.delete(relative_path) end end |