thrust 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/bin/thrust +2 -9
  3. data/lib/config/{ios_example.yml → thrust_example.yml} +26 -19
  4. data/lib/tasks/autotag.rake +2 -2
  5. data/lib/tasks/cedar.rake +8 -11
  6. data/lib/tasks/testflight.rake +5 -14
  7. data/lib/tasks/version.rake +3 -7
  8. data/lib/thrust.rb +11 -13
  9. data/lib/thrust/agv_tool.rb +14 -0
  10. data/lib/thrust/app_config.rb +24 -10
  11. data/lib/thrust/cedar_results_parser.rb +7 -0
  12. data/lib/thrust/config_loader.rb +48 -0
  13. data/lib/thrust/deploy.rb +53 -0
  14. data/lib/thrust/deploy_provider.rb +17 -0
  15. data/lib/thrust/deployment_target.rb +6 -6
  16. data/lib/thrust/execution_helper.rb +1 -1
  17. data/lib/thrust/executor.rb +2 -1
  18. data/lib/thrust/ios_spec_launcher.rb +36 -0
  19. data/lib/thrust/osx_spec_launcher.rb +15 -0
  20. data/lib/thrust/scheme_parser.rb +35 -0
  21. data/lib/thrust/{ios_spec_target.rb → spec_target.rb} +1 -3
  22. data/lib/thrust/tasks.rb +1 -1
  23. data/lib/thrust/tasks/autotag/list.rb +2 -2
  24. data/lib/thrust/tasks/clean.rb +5 -5
  25. data/lib/thrust/tasks/focused_specs.rb +14 -4
  26. data/lib/thrust/tasks/nof.rb +8 -3
  27. data/lib/thrust/tasks/spec_runner.rb +75 -0
  28. data/lib/thrust/xcode_tools.rb +159 -0
  29. data/lib/thrust/xcode_tools_provider.rb +11 -0
  30. metadata +36 -23
  31. data/lib/config/android_example.yml +0 -17
  32. data/lib/thrust/android/deploy.rb +0 -38
  33. data/lib/thrust/android/deploy_provider.rb +0 -16
  34. data/lib/thrust/android/tools.rb +0 -43
  35. data/lib/thrust/config.rb +0 -43
  36. data/lib/thrust/ios/agv_tool.rb +0 -16
  37. data/lib/thrust/ios/cedar.rb +0 -27
  38. data/lib/thrust/ios/deploy.rb +0 -55
  39. data/lib/thrust/ios/deploy_provider.rb +0 -19
  40. data/lib/thrust/ios/x_code_tools.rb +0 -154
  41. data/lib/thrust/ios/x_code_tools_provider.rb +0 -13
  42. data/lib/thrust/tasks/ios_specs.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61067cb4daeb431ef6273f47bb72187c0ba5573a
4
- data.tar.gz: 87bad3017b087b47a85b74757f3d36ad5eb787ba
3
+ metadata.gz: 4af4e735542bbbc21050f9b8f23a081eb3132c93
4
+ data.tar.gz: 087eaad19b5bbfbd21346b8fcd6f63a94e63bf41
5
5
  SHA512:
6
- metadata.gz: dc0d52a8654adb83ef3e369441a709acddf2e620f40d7cb35616649a706341da8c40fb4ecbe6d65a21bcc2c47c651edbe9f859644938df36eb7f8d39390359b5
7
- data.tar.gz: 9c0bbd55a2c12afb30999bf093515154d6423dcc2e8b2efc941c021e25a0c42e54adb60d9629797671f23fa6dc8246f9ee088090cbfa2db1c56cce8b92b99452
6
+ metadata.gz: 7276e115badf2322966be2f3b1dbd3f395dd99a654b7579b38745c65cff6b08b4522c7fcfa152ce4a9c38d2ed42d039698caf470378539f925d29f2d2fffd6b2
7
+ data.tar.gz: 77bef75792b11abc24117e6101c488b08f10c44c15e3989ea435dfd6ca5ee7160c15bbd5e64c90111e7563554e95cb925a71920c2a8b1bae234593a012f7a9f5
data/bin/thrust CHANGED
@@ -13,21 +13,14 @@ end
13
13
 
14
14
  require 'fileutils'
15
15
  project_root = Dir.pwd
16
- thrust_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
16
+ thrust_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
17
17
 
18
18
  rakefile = File.join(project_root, 'Rakefile')
19
19
  File.open(rakefile, 'a+') do |f|
20
20
  f.puts "require 'thrust/tasks'" unless f.grep(/require 'thrust\/tasks'/).any?
21
21
  end
22
22
 
23
- if File.exists?('AndroidManifest.xml')
24
- example_file_name = 'android_example.yml'
25
- else
26
- example_file_name = 'ios_example.yml'
27
- end
28
-
29
-
30
- FileUtils.cp(File.join(thrust_root, 'lib', 'config', example_file_name), File.join(project_root, 'thrust.example.yml'))
23
+ FileUtils.cp(File.join(thrust_root, 'lib', 'config', 'thrust_example.yml'), File.join(project_root, 'thrust.example.yml'))
31
24
  puts ''
32
25
  puts ' To finish installation of Thrust, rename ' + 'thrust.example.yml'.blue + ' to ' + 'thrust.yml'.blue + ' and edit it for your project.'
33
26
 
@@ -1,9 +1,9 @@
1
- thrust_version: 0.5
1
+ thrust_version: 0.6
2
2
  project_name: My Great Project # do not use if building with an xcode workspace
3
3
  # workspace_name: My Workspace # use if building with an xcode workspace
4
4
  # path_to_xcodeproj: 'App/MyApp.xcodeproj' # use if xcodeproj is not in the same directory as this yaml file. Optional.
5
5
  app_name: My Great App
6
- ios_distribution_certificate: 'Name of Distribution Signing Certificate'
6
+ distribution_certificate: 'Name of Distribution Signing Certificate'
7
7
  #ios_sim_path: '/path/to/ios-sim' # Optional. Use to prefer a specific ios-sim binary (e.g. within project directory) over a system-installed version (homebrew)
8
8
 
9
9
  testflight:
@@ -15,38 +15,45 @@ deployment_targets:
15
15
  distribution_list: Developers # This is the name of a TestFlight distribution list
16
16
  notify: true # Whether to notify people on the distribution list about this deployment
17
17
  note_generation_method: autotag # If you set this value, it will auto-generate the deploy notes from the commit history. Optional.
18
- ios_target: MyGreatAppTarget # Name of the build target. Optional, defaults to app name.
19
- ios_build_configuration: Release
20
- ios_provisioning_search_query: 'query to find Provisioning Profile' # Otherwise, it will use the first provisioning profile in ~/Library/MobileDevice/Provisioning Profiles/
18
+ target: MyGreatAppTarget # Name of the build target. Optional, defaults to app name.
19
+ build_configuration: Release
20
+ provisioning_search_query: 'query to find Provisioning Profile' # Otherwise, it will use the first provisioning profile in ~/Library/MobileDevice/Provisioning Profiles/
21
21
  versioning_method: 'none' # or 'timestamp-sha' or 'commits'. Leave blank to use Git commit SHAs for build numbers.
22
22
  tag: ci # Deploys latest commit with the tag. Leave blank to deploy from master.
23
23
 
24
24
  demo:
25
25
  distribution_list: Beta Testers
26
26
  notify: true
27
- ios_build_configuration: Demo
28
- ios_provisioning_search_query: 'query to find Provisioning Profile'
27
+ build_configuration: Demo
28
+ provisioning_search_query: 'query to find Provisioning Profile'
29
29
 
30
- ios_spec_targets:
31
- specs: # This is the name of the rake task: `rake specs`
32
- target: UISpecs # Name of the build target.
33
- scheme: Specs (My Great App) # Use if the scheme name is different from the target name. Necessary when building in an xcode workspace.
30
+ spec_targets:
31
+ # Example of an iOS spec suite configuration.
32
+ specs: # This is the name of the rake task
33
+ scheme: Specs (My Great App) # Name of the scheme.
34
34
  type: app # Spec target type: 'app' or 'bundle'. Optional, defaults to app.
35
35
  build_configuration: Debug # Name of the build configuration.
36
- build_sdk: iphonesimulator7.0 # SDK used to build the target. Optional, defaults to latest iphonesimulator.
37
- device_name: iPhone 4s # Device name as suggested by `ios-sim showdevicetypes`.
38
- os_version: 7.1 # OS version to run. Defaults to latest available version.
39
- timeout: 90 # Optional. Destination timeout defaults to 30 seconds.
36
+ build_sdk: iphonesimulator8.1 # SDK used to build the target. Optional, defaults to latest iphonesimulator.
37
+ device_name: iPhone 6 # Device name. Run `ios-sim showdevicetypes` to see a full list of available devices.
38
+ os_version: 8.1 # OS version to run. Optional, defaults to latest available version.
39
+ timeout: 90 # Optional, defaults to 30 seconds.
40
40
 
41
- spec_bundle: # Example of a spec bundle configuration.
41
+ # Example of an iOS spec bundle configuration.
42
+ spec_bundle:
42
43
  scheme: My Great App # Use the name for the main app scheme.
43
44
  type: bundle
44
45
  build_configuration: Debug
45
46
  device_name: iPhone 4s
46
47
  os_version: 7.1
47
48
 
48
- integration: # Example of a Mac OSX target.
49
- target: IntegrationSpecs
50
- scheme: IntegrationSpecs (My Great App) # Use if the scheme name is different from the target name. Necessary when building in an xcode workspace.
49
+ # Example of a Mac OSX target configuration.
50
+ integration:
51
+ scheme: IntegrationSpecs (My Great App)
51
52
  build_configuration: Release
52
53
  build_sdk: macosx
54
+
55
+ spec_directories:
56
+ - SpecSuite
57
+ - SpecBundle
58
+ - WatchKit/SpecBundle
59
+ - MacSpecSuite
@@ -1,6 +1,6 @@
1
1
  require_relative '../thrust'
2
2
 
3
- @thrust = Thrust::Config.make(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
3
+ @app_config = Thrust::ConfigLoader.load_configuration(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
4
4
 
5
5
  namespace :autotag do
6
6
  task :create, :stage do |_, args|
@@ -9,6 +9,6 @@ namespace :autotag do
9
9
 
10
10
  desc 'Show the commit that is currently deployed to each environment'
11
11
  task :list do
12
- Thrust::Tasks::Autotag::List.new.run(@thrust)
12
+ Thrust::Tasks::Autotag::List.new.run(@app_config)
13
13
  end
14
14
  end
@@ -1,6 +1,6 @@
1
1
  require_relative '../thrust'
2
2
 
3
- @thrust = Thrust::Config.make(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
3
+ @app_config = Thrust::ConfigLoader.load_configuration(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
4
4
 
5
5
  desc 'Trim whitespace'
6
6
  task :trim do
@@ -9,25 +9,22 @@ end
9
9
 
10
10
  desc 'Remove any focus from specs'
11
11
  task :nof do
12
- Thrust::Tasks::Nof.new.run
12
+ Thrust::Tasks::Nof.new.run(@app_config)
13
13
  end
14
14
 
15
15
  desc 'Print out names of files containing focused specs'
16
16
  task :focused_specs do
17
- Thrust::Tasks::FocusedSpecs.new.run(@thrust)
17
+ Thrust::Tasks::FocusedSpecs.new.run(@app_config)
18
18
  end
19
19
 
20
- desc 'Clean all targets'
20
+ desc 'Cleans all build directories'
21
21
  task :clean do
22
- Thrust::Tasks::Clean.new.run(@thrust)
22
+ Thrust::Tasks::Clean.new.run(@app_config)
23
23
  end
24
24
 
25
- desc 'Clean all targets (deprecated, use "clean")'
26
- task :clean_build => :clean
27
-
28
- @thrust.app_config.ios_spec_targets.each do |target_name, target_info|
29
- desc target_info.scheme ? "Run the #{target_info.scheme} scheme" : "Run the #{target_info.target} target"
25
+ @app_config.spec_targets.each do |target_name, target_info|
26
+ desc "Run the #{target_info.scheme} scheme"
30
27
  task target_name, :device_name, :os_version do |_, args|
31
- exit(1) unless Thrust::Tasks::IOSSpecs.new.run(@thrust, target_info, args)
28
+ exit(1) unless Thrust::Tasks::SpecRunner.new.run(@app_config, target_info, args)
32
29
  end
33
30
  end
@@ -1,21 +1,12 @@
1
1
  require_relative '../thrust'
2
2
 
3
- @thrust = Thrust::Config.make(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
3
+ @app_config = Thrust::ConfigLoader.load_configuration(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
4
4
 
5
5
  namespace :testflight do
6
- android_project = File.exists?('AndroidManifest.xml')
7
-
8
- @thrust.app_config.deployment_targets.each do |task_name, deployment_config|
9
- if android_project
10
- desc "Deploy Android build to #{task_name} (use NOTIFY=false to prevent team notification)"
11
- task task_name do |_, _|
12
- Thrust::Android::DeployProvider.new.instance(@thrust, deployment_config, task_name).run
13
- end
14
- else
15
- desc "Deploy iOS build to #{task_name} (use NOTIFY=false to prevent team notification)"
16
- task task_name do |_, _|
17
- Thrust::IOS::DeployProvider.new.instance(@thrust, deployment_config, task_name).run
18
- end
6
+ @app_config.deployment_targets.each do |task_name, deployment_config|
7
+ desc "Deploy iOS build to #{task_name} (use NOTIFY=false to prevent team notification)"
8
+ task task_name do |_, _|
9
+ Thrust::DeployProvider.new.instance(@app_config, deployment_config, task_name).run
19
10
  end
20
11
  end
21
12
  end
@@ -1,13 +1,9 @@
1
1
  require_relative '../thrust'
2
2
 
3
- @thrust = Thrust::Config.make(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
3
+ @app_config = Thrust::ConfigLoader.load_configuration(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
4
4
 
5
5
  desc 'Set build number'
6
6
  task :set_build_number, :build_number do |_, args|
7
- if File.exists?('AndroidManifest.xml')
8
- Thrust::Android::Tools.new.change_build_number(Time.now.utc.strftime('%y%m%d%H%M'), args[:build_number])
9
- else
10
- path_to_xcodeproj = @thrust.app_config.path_to_xcodeproj
11
- Thrust::IOS::AgvTool.new.change_build_number(args[:build_number], nil, path_to_xcodeproj)
12
- end
7
+ path_to_xcodeproj = @app_config.path_to_xcodeproj
8
+ Thrust::AgvTool.new.change_build_number(args[:build_number], nil, path_to_xcodeproj)
13
9
  end
@@ -1,25 +1,23 @@
1
- require 'thrust/config'
1
+ require 'thrust/config_loader'
2
2
  require 'thrust/executor'
3
3
  require 'thrust/execution_helper'
4
4
  require 'thrust/git'
5
5
  require 'thrust/testflight'
6
6
  require 'thrust/user_prompt'
7
-
8
- require 'thrust/android/deploy'
9
- require 'thrust/android/deploy_provider'
10
- require 'thrust/android/tools'
11
-
12
- require 'thrust/ios/agv_tool'
13
- require 'thrust/ios/cedar'
14
- require 'thrust/ios/deploy'
15
- require 'thrust/ios/deploy_provider'
16
- require 'thrust/ios/x_code_tools'
17
- require 'thrust/ios/x_code_tools_provider'
7
+ require 'thrust/agv_tool'
8
+ require 'thrust/ios_spec_launcher'
9
+ require 'thrust/osx_spec_launcher'
10
+ require 'thrust/deploy'
11
+ require 'thrust/deploy_provider'
12
+ require 'thrust/xcode_tools'
13
+ require 'thrust/xcode_tools_provider'
14
+ require 'thrust/scheme_parser'
15
+ require 'thrust/cedar_results_parser'
18
16
 
19
17
  require 'thrust/tasks/autotag/create'
20
18
  require 'thrust/tasks/autotag/list'
21
19
  require 'thrust/tasks/clean'
22
20
  require 'thrust/tasks/focused_specs'
23
- require 'thrust/tasks/ios_specs'
21
+ require 'thrust/tasks/spec_runner'
24
22
  require 'thrust/tasks/nof'
25
23
  require 'thrust/tasks/trim'
@@ -0,0 +1,14 @@
1
+ module Thrust
2
+ class AgvTool
3
+ def initialize(thrust_executor = Thrust::Executor.new, git = Thrust::Git.new)
4
+ @thrust_executor = thrust_executor
5
+ @git = git
6
+ end
7
+
8
+ def change_build_number(build_number, timestamp = nil, path_to_xcodeproj = nil)
9
+ path_to_xcodeproj = path_to_xcodeproj ? File.dirname(path_to_xcodeproj) : '.'
10
+ @thrust_executor.system_or_exit "cd #{path_to_xcodeproj} && agvtool new-version -all '#{timestamp ? timestamp + '-' : ''}#{build_number}'"
11
+ @git.checkout_file("#{path_to_xcodeproj}/*.xcodeproj")
12
+ end
13
+ end
14
+ end
@@ -1,26 +1,32 @@
1
1
  require_relative 'deployment_target'
2
- require_relative 'ios_spec_target'
2
+ require_relative 'spec_target'
3
3
  require_relative 'testflight_credentials'
4
4
 
5
5
  module Thrust
6
6
  class AppConfig
7
7
  attr_reader :app_name,
8
8
  :deployment_targets,
9
- :ios_distribution_certificate,
9
+ :distribution_certificate,
10
10
  :ios_sim_path,
11
- :ios_spec_targets,
11
+ :spec_targets,
12
12
  :project_name,
13
13
  :testflight,
14
14
  :thrust_version,
15
15
  :workspace_name,
16
- :path_to_xcodeproj
16
+ :path_to_xcodeproj,
17
+ :spec_directories,
18
+ :build_directory,
19
+ :project_root
17
20
 
18
21
  def initialize(attributes)
22
+ @build_directory = attributes['build_directory']
23
+ @project_root = attributes['project_root']
19
24
  @app_name = attributes['app_name']
20
25
  @deployment_targets = generate_deployment_targets(attributes['deployment_targets'])
21
- @ios_distribution_certificate = attributes['ios_distribution_certificate']
26
+ @distribution_certificate = attributes['distribution_certificate']
22
27
  @ios_sim_path = attributes['ios_sim_path']
23
- @ios_spec_targets = generate_ios_spec_targets(attributes['ios_spec_targets'])
28
+ @spec_targets = generate_spec_targets(attributes['spec_targets'])
29
+ @spec_directories = generate_spec_directories(attributes['spec_directories'])
24
30
  @project_name = attributes['project_name']
25
31
  @testflight = generate_testflight_credentials(attributes['testflight'])
26
32
  @thrust_version = attributes['thrust_version'].to_s
@@ -30,15 +36,23 @@ module Thrust
30
36
 
31
37
  private
32
38
 
33
- def generate_ios_spec_targets(ios_spec_targets_hash)
34
- return {} if ios_spec_targets_hash.nil?
39
+ def generate_spec_targets(spec_targets_hash)
40
+ return {} if spec_targets_hash.nil?
35
41
 
36
- ios_spec_targets_hash.inject({}) do |existing, (key, value)|
37
- existing[key] = IOSSpecTarget.new(value)
42
+ spec_targets_hash.inject({}) do |existing, (key, value)|
43
+ existing[key] = SpecTarget.new(value)
38
44
  existing
39
45
  end
40
46
  end
41
47
 
48
+ def generate_spec_directories(spec_directories)
49
+ return [] if spec_directories.nil?
50
+
51
+ spec_directories.map do |sd|
52
+ File.expand_path(File.join(project_root, sd))
53
+ end
54
+ end
55
+
42
56
  def generate_deployment_targets(deployment_targets_hash)
43
57
  return {} if deployment_targets_hash.nil?
44
58
 
@@ -0,0 +1,7 @@
1
+ module Thrust
2
+ class CedarResultsParser
3
+ def self.parse_results_for_success(results)
4
+ results.include?("Finished") && !results.include?("FAILURE") && !results.include?("EXCEPTION")
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,48 @@
1
+ require 'colorize'
2
+ require_relative 'app_config'
3
+ require 'yaml'
4
+
5
+ module Thrust
6
+ class ConfigLoader
7
+ class ConfigError < StandardError ; end
8
+ class MissingConfigError < ConfigError ; end
9
+ class MalformedConfigError < ConfigError ; end
10
+ class InvalidVersionConfigError < ConfigError ; end
11
+
12
+ THRUST_VERSION = '0.6'
13
+
14
+ def self.load_configuration(relative_project_root, config_file, out = STDERR)
15
+ begin
16
+ config = YAML.load_file(config_file)
17
+ rescue Errno::ENOENT
18
+ out.puts ""
19
+ out.puts " Missing thrust.yml. Create by running:\n".red
20
+ out.puts " cp thrust.example.yml thrust.yml".blue
21
+ raise MissingConfigError
22
+ rescue Psych::SyntaxError
23
+ out.puts ""
24
+ out.puts " Malformed thrust.yml.".red
25
+ raise MalformedConfigError
26
+ end
27
+
28
+ project_root = File.expand_path(relative_project_root)
29
+ config['project_root'] = project_root
30
+ config['build_directory'] = File.join(project_root, 'build')
31
+
32
+ app_config = Thrust::AppConfig.new(config)
33
+ verify_configuration(app_config, out)
34
+
35
+ app_config
36
+ end
37
+
38
+ private
39
+
40
+ def self.verify_configuration(app_config, out)
41
+ if app_config.thrust_version != THRUST_VERSION
42
+ out.puts ''
43
+ out.puts " Invalid configuration. Have you updated thrust recently? Your thrust.yml specifies an out-of-date version, and thrust is at version: #{THRUST_VERSION}. See README for details.".red
44
+ raise InvalidVersionConfigError
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,53 @@
1
+ module Thrust
2
+ class Deploy
3
+ def initialize(out, xcode_tools, agv_tool, git, testflight, app_config, deployment_config, deployment_target)
4
+ @out = out
5
+ @xcode_tools = xcode_tools
6
+ @agv_tool = agv_tool
7
+ @git = git
8
+ @testflight = testflight
9
+ @app_config = app_config
10
+ @deployment_config = deployment_config
11
+ @deployment_target = deployment_target
12
+ end
13
+
14
+ def run
15
+ @git.ensure_clean
16
+
17
+ begin
18
+ @git.checkout_tag(@deployment_config.tag) if @deployment_config.tag
19
+
20
+ if @deployment_config.versioning_method != 'none'
21
+ if @deployment_config.versioning_method == 'commits'
22
+ @agv_tool.change_build_number(@git.commit_count, nil, @app_config.path_to_xcodeproj)
23
+ elsif @deployment_config.versioning_method == 'timestamp-sha'
24
+ @agv_tool.change_build_number(@git.current_commit, Time.now.utc.strftime('%y%m%d%H%M'), @app_config.path_to_xcodeproj)
25
+ else
26
+ @agv_tool.change_build_number(@git.current_commit, nil, @app_config.path_to_xcodeproj)
27
+ end
28
+ end
29
+
30
+ app_name = @app_config.app_name
31
+ target = @deployment_config.target || app_name
32
+
33
+ ipa_file = @xcode_tools.cleanly_create_ipa(target, app_name, @app_config.distribution_certificate, @deployment_config.provisioning_search_query)
34
+
35
+ dsym_path = "#{@xcode_tools.build_configuration_directory}/#{app_name}.app.dSYM"
36
+ dsym_path = nil unless File.exist?(dsym_path)
37
+
38
+ autogenerate_notes = @deployment_config.note_generation_method == 'autotag'
39
+ @testflight.upload(ipa_file, @deployment_config.notify, @deployment_config.distribution_list, autogenerate_notes, @deployment_target, dsym_path)
40
+
41
+ @git.create_tag(@deployment_target)
42
+ @git.reset
43
+ rescue Exception => e
44
+ @out.puts "\n\n"
45
+ @out.puts e.message.red
46
+ @out.puts "\n\n"
47
+
48
+ @git.reset
49
+ exit 1
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,17 @@
1
+ module Thrust
2
+ class DeployProvider
3
+ def instance(app_config, deployment_config, deployment_target)
4
+ stdout = $stdout
5
+ thrust_executor = Thrust::Executor.new
6
+ build_configuration = deployment_config.build_configuration
7
+ tools_options = {project_name: app_config.project_name, workspace_name: app_config.workspace_name}
8
+ xcode_tools = Thrust::XcodeToolsProvider.new.instance(stdout, build_configuration, app_config.build_directory, tools_options)
9
+ git = Thrust::Git.new(stdout, thrust_executor)
10
+ agv_tool = Thrust::AgvTool.new(thrust_executor, git)
11
+ testflight_config = app_config.testflight
12
+ testflight = Thrust::Testflight.new(thrust_executor, stdout, $stdin, testflight_config.api_token, testflight_config.team_token)
13
+
14
+ Thrust::Deploy.new(stdout, xcode_tools, agv_tool, git, testflight, app_config, deployment_config, deployment_target)
15
+ end
16
+ end
17
+ end