Class: Souyuz::ZipDsymCommandGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/souyuz/generators/zip_dsym_command_generator.rb

Overview

Responsible for building the zip dsym command

Class Method Summary collapse

Class Method Details

.detect_zip_executableObject



19
20
21
22
23
24
25
# File 'lib/souyuz/generators/zip_dsym_command_generator.rb', line 19

def detect_zip_executable
  # dunno if anyone wants a zip which is not available thorgh PATH
  # but if this case exists, we provide the opportunity to do so
  zip = ENV['SOUYUZ_ZIP_PATH'] || 'zip'

  zip
end

.generateObject



6
7
8
9
10
11
12
13
# File 'lib/souyuz/generators/zip_dsym_command_generator.rb', line 6

def generate
  parts = prefix
  parts << detect_zip_executable
  parts += options
  parts += pipe

  parts
end

.optionsObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/souyuz/generators/zip_dsym_command_generator.rb', line 27

def options
  build_dsym_path = Souyuz.cache[:build_dsym_path]

  options = []
  options << "-r"
  options << "#{build_dsym_path}.zip"
  options << build_dsym_path

  options
end

.pipeObject



38
39
40
41
42
# File 'lib/souyuz/generators/zip_dsym_command_generator.rb', line 38

def pipe
  pipe = []

  pipe
end

.prefixObject



15
16
17
# File 'lib/souyuz/generators/zip_dsym_command_generator.rb', line 15

def prefix
  ["set -o pipefail &&"]
end