Class: Fastlane::Helper::DebugFileHelper
- Inherits:
-
Object
- Object
- Fastlane::Helper::DebugFileHelper
- Defined in:
- lib/fastlane/plugin/debug_file/helper/debug_file_helper.rb
Class Method Summary collapse
- .compress(src_files, desc_file) ⇒ Object
- .determine_output_file(output_file, overwrite) ⇒ Object
- .store_shard_value(key, value) ⇒ Object
Class Method Details
.compress(src_files, desc_file) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fastlane/plugin/debug_file/helper/debug_file_helper.rb', line 8 def self.compress(src_files, desc_file) require 'zip' output_path = File.dirname(desc_file) FileUtils.mkdir_p output_path unless Dir.exist?(output_path) ::Zip::File.open(desc_file, ::Zip::File::CREATE) do |zipfile| src_files.each do |file| zipfile.add File.basename(file), file end end end |
.determine_output_file(output_file, overwrite) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/fastlane/plugin/debug_file/helper/debug_file_helper.rb', line 20 def self.determine_output_file(output_file, overwrite) if File.exist?(output_file) if overwrite FileUtils.rm_f output_file else UI.user_error! "Compressed file was existed: #{output_file}" end end end |
.store_shard_value(key, value) ⇒ Object
30 31 32 33 |
# File 'lib/fastlane/plugin/debug_file/helper/debug_file_helper.rb', line 30 def self.store_shard_value(key, value) Actions.lane_context[key] = value ENV[key.to_s] = value end |