Class: Fastlane::Helper::StoreSizerHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/store_sizer/helper/store_sizer_helper.rb

Class Method Summary collapse

Class Method Details

.write_random_file(path, size) ⇒ Object



13
14
15
# File 'lib/fastlane/plugin/store_sizer/helper/store_sizer_helper.rb', line 13

def self.write_random_file(path, size)
  IO.binwrite(path, SecureRandom.random_bytes(size))
end

.write_random_segments(file_path, segments) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/fastlane/plugin/store_sizer/helper/store_sizer_helper.rb', line 4

def self.write_random_segments(file_path, segments)
  File.open(file_path, "rb+") do |file|
    segments.each do |segment|
      file.pos = segment[0]
      file.puts(SecureRandom.random_bytes(segment[1]))
    end
  end
end

.xcode_export_package(archive_path, export_options_plist_path, export_path) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/fastlane/plugin/store_sizer/helper/store_sizer_helper.rb', line 17

def self.xcode_export_package(archive_path, export_options_plist_path, export_path)
  command = "xcodebuild"
  command << " -exportArchive"
  command << " -exportOptionsPlist #{export_options_plist_path}"
  command << " -archivePath #{archive_path}"
  command << " -exportPath #{export_path}"
  FastlaneCore::CommandExecutor.execute(command: command, print_command: false, print_all: false)
end