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..
39 40 41 42 43 44 45 46 |
# File 'lib/souyuz/runner.rb', line 39 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
28 29 30 31 32 33 |
# File 'lib/souyuz/runner.rb', line 28 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
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/souyuz/runner.rb', line 90 def compress_and_move_dsym build_path = Souyuz.project.[:output_path] assembly_name = Souyuz.project.[:assembly_name] build_dsym_path = "#{build_path}/#{assembly_name}.app.dSYM" if not File.exists? build_dsym_path UI.success "Did not found dSYM at #{build_dsym_path}, skipping..." return end Souyuz.cache[:build_dsym_path] = build_dsym_path 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
84 85 86 87 88 |
# File 'lib/souyuz/runner.rb', line 84 def ipa_file assembly_name = Souyuz.project.[:assembly_name] "#{package_path}/#{assembly_name}.ipa" end |
#jarsign_and_zipalign ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/souyuz/runner.rb', line 48 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..
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/souyuz/runner.rb', line 66 def package_path build_path = Souyuz.project.[:output_path] assembly_name = Souyuz.project.[:assembly_name] # in the upcomming switch we determin the output path of iOS ipa files # those change in the Xamarin.iOS Cycle 9 release # see https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.4/ if File.exists? "#{build_path}/#{assembly_name}.ipa" # after Xamarin.iOS Cycle 9 package_path = build_path else # before Xamarin.iOS Cycle 9 package_path = Dir.glob("#{build_path}/#{assembly_name} *").sort.last end package_path end |
#run ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/souyuz/runner.rb', line 6 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 |