Class: Souyuz::Runner
- Inherits:
-
Object
- Object
- Souyuz::Runner
- Defined in:
- lib/souyuz/runner.rb
Instance Method Summary collapse
-
#apk_file ⇒ Object
android build stuff to follow..
- #build_app ⇒ Object
- #compress_and_move_dsym ⇒ Object
- #ipa_file ⇒ Object
- #jarsign_and_zipalign ⇒ Object
-
#package_path ⇒ Object
ios build stuff to follow..
- #run ⇒ Object
Instance Method Details
#apk_file ⇒ Object
android build stuff to follow..
37 38 39 40 41 42 43 44 |
# File 'lib/souyuz/runner.rb', line 37 def apk_file build_path = Souyuz.project.[:output_path] assembly_name = Souyuz.project.[:assembly_name] Souyuz.cache[:build_apk_path] = "#{build_path}/#{assembly_name}.apk" "#{build_path}/#{assembly_name}.apk" end |
#build_app ⇒ Object
26 27 28 29 30 31 |
# File 'lib/souyuz/runner.rb', line 26 def build_app command = BuildCommandGenerator.generate FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: !Souyuz.config[:silent]) end |
#compress_and_move_dsym ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/souyuz/runner.rb', line 77 def compress_and_move_dsym build_path = Souyuz.project.[:output_path] assembly_name = Souyuz.project.[:assembly_name] Souyuz.cache[:build_dsym_path] = "#{build_path}/#{assembly_name}.app.dSYM" command = ZipDsymCommandGenerator.generate FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: !Souyuz.config[:silent]) # move dsym aside ipa dsym_path = "#{dsym_path}.zip" if File.exists? dsym_path FileUtils.mv(dsym_path, "#{package_path}/#{File.basename dsym_path}") end end |
#ipa_file ⇒ Object
71 72 73 74 75 |
# File 'lib/souyuz/runner.rb', line 71 def ipa_file assembly_name = Souyuz.project.[:assembly_name] "#{package_path}/#{assembly_name}.ipa" end |
#jarsign_and_zipalign ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/souyuz/runner.rb', line 46 def jarsign_and_zipalign command = JavaSignCommandGenerator.generate FastlaneCore::CommandExecutor.execute(command: command, print_all: false, print_command: !Souyuz.config[:silent]) UI.success "Successfully signed apk #{Souyuz.cache[:build_apk_path]}" command = AndroidZipalignCommandGenerator.generate FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: !Souyuz.config[:silent]) end |
#package_path ⇒ Object
ios build stuff to follow..
64 65 66 67 68 69 |
# File 'lib/souyuz/runner.rb', line 64 def package_path build_path = Souyuz.project.[:output_path] assembly_name = Souyuz.project.[:assembly_name] package_path = Dir.glob("#{build_path}/#{assembly_name} *").sort.last end |
#run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/souyuz/runner.rb', line 4 def run config = Souyuz.config build_app if Souyuz.project.ios? or Souyuz.project.osx? compress_and_move_dsym path = ipa_file path elsif Souyuz.project.android? path = apk_file if (config[:keystore_path] && config[:keystore_alias]) UI.success "Jar it, sign it, zip it..." jarsign_and_zipalign end path end end |