thrust 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/thrust +2 -9
- data/lib/config/{ios_example.yml → thrust_example.yml} +26 -19
- data/lib/tasks/autotag.rake +2 -2
- data/lib/tasks/cedar.rake +8 -11
- data/lib/tasks/testflight.rake +5 -14
- data/lib/tasks/version.rake +3 -7
- data/lib/thrust.rb +11 -13
- data/lib/thrust/agv_tool.rb +14 -0
- data/lib/thrust/app_config.rb +24 -10
- data/lib/thrust/cedar_results_parser.rb +7 -0
- data/lib/thrust/config_loader.rb +48 -0
- data/lib/thrust/deploy.rb +53 -0
- data/lib/thrust/deploy_provider.rb +17 -0
- data/lib/thrust/deployment_target.rb +6 -6
- data/lib/thrust/execution_helper.rb +1 -1
- data/lib/thrust/executor.rb +2 -1
- data/lib/thrust/ios_spec_launcher.rb +36 -0
- data/lib/thrust/osx_spec_launcher.rb +15 -0
- data/lib/thrust/scheme_parser.rb +35 -0
- data/lib/thrust/{ios_spec_target.rb → spec_target.rb} +1 -3
- data/lib/thrust/tasks.rb +1 -1
- data/lib/thrust/tasks/autotag/list.rb +2 -2
- data/lib/thrust/tasks/clean.rb +5 -5
- data/lib/thrust/tasks/focused_specs.rb +14 -4
- data/lib/thrust/tasks/nof.rb +8 -3
- data/lib/thrust/tasks/spec_runner.rb +75 -0
- data/lib/thrust/xcode_tools.rb +159 -0
- data/lib/thrust/xcode_tools_provider.rb +11 -0
- metadata +36 -23
- data/lib/config/android_example.yml +0 -17
- data/lib/thrust/android/deploy.rb +0 -38
- data/lib/thrust/android/deploy_provider.rb +0 -16
- data/lib/thrust/android/tools.rb +0 -43
- data/lib/thrust/config.rb +0 -43
- data/lib/thrust/ios/agv_tool.rb +0 -16
- data/lib/thrust/ios/cedar.rb +0 -27
- data/lib/thrust/ios/deploy.rb +0 -55
- data/lib/thrust/ios/deploy_provider.rb +0 -19
- data/lib/thrust/ios/x_code_tools.rb +0 -154
- data/lib/thrust/ios/x_code_tools_provider.rb +0 -13
- data/lib/thrust/tasks/ios_specs.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4af4e735542bbbc21050f9b8f23a081eb3132c93
|
4
|
+
data.tar.gz: 087eaad19b5bbfbd21346b8fcd6f63a94e63bf41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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.
|
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
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
28
|
-
|
27
|
+
build_configuration: Demo
|
28
|
+
provisioning_search_query: 'query to find Provisioning Profile'
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
scheme: Specs (My Great App) #
|
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:
|
37
|
-
device_name: iPhone
|
38
|
-
os_version:
|
39
|
-
timeout: 90 # Optional
|
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
|
-
|
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
|
-
|
49
|
-
|
50
|
-
scheme: IntegrationSpecs (My Great App)
|
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
|
data/lib/tasks/autotag.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../thrust'
|
2
2
|
|
3
|
-
@
|
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(@
|
12
|
+
Thrust::Tasks::Autotag::List.new.run(@app_config)
|
13
13
|
end
|
14
14
|
end
|
data/lib/tasks/cedar.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../thrust'
|
2
2
|
|
3
|
-
@
|
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(@
|
17
|
+
Thrust::Tasks::FocusedSpecs.new.run(@app_config)
|
18
18
|
end
|
19
19
|
|
20
|
-
desc '
|
20
|
+
desc 'Cleans all build directories'
|
21
21
|
task :clean do
|
22
|
-
Thrust::Tasks::Clean.new.run(@
|
22
|
+
Thrust::Tasks::Clean.new.run(@app_config)
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
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::
|
28
|
+
exit(1) unless Thrust::Tasks::SpecRunner.new.run(@app_config, target_info, args)
|
32
29
|
end
|
33
30
|
end
|
data/lib/tasks/testflight.rake
CHANGED
@@ -1,21 +1,12 @@
|
|
1
1
|
require_relative '../thrust'
|
2
2
|
|
3
|
-
@
|
3
|
+
@app_config = Thrust::ConfigLoader.load_configuration(Dir.getwd, File.join(Dir.getwd, 'thrust.yml'))
|
4
4
|
|
5
5
|
namespace :testflight do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/tasks/version.rake
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
require_relative '../thrust'
|
2
2
|
|
3
|
-
@
|
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
|
-
|
8
|
-
|
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
|
data/lib/thrust.rb
CHANGED
@@ -1,25 +1,23 @@
|
|
1
|
-
require 'thrust/
|
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/
|
9
|
-
require 'thrust/
|
10
|
-
require 'thrust/
|
11
|
-
|
12
|
-
require 'thrust/
|
13
|
-
require 'thrust/
|
14
|
-
require 'thrust/
|
15
|
-
require 'thrust/
|
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/
|
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
|
data/lib/thrust/app_config.rb
CHANGED
@@ -1,26 +1,32 @@
|
|
1
1
|
require_relative 'deployment_target'
|
2
|
-
require_relative '
|
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
|
-
:
|
9
|
+
:distribution_certificate,
|
10
10
|
:ios_sim_path,
|
11
|
-
:
|
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
|
-
@
|
26
|
+
@distribution_certificate = attributes['distribution_certificate']
|
22
27
|
@ios_sim_path = attributes['ios_sim_path']
|
23
|
-
@
|
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
|
34
|
-
return {} if
|
39
|
+
def generate_spec_targets(spec_targets_hash)
|
40
|
+
return {} if spec_targets_hash.nil?
|
35
41
|
|
36
|
-
|
37
|
-
existing[key] =
|
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,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
|