Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload dSYM to Testflight #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/beta_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,18 @@ def derived_build_dir_from_build_output
output.build_output_dir
end

def dsym_file_name
"#{app_file_name}.dSYM"
end

def built_app_dsym_path
"#{built_app_path}.dSYM"
end

def built_app_dsym_zip_path
"#{built_app_dsym_path}.zip"
end

def dist_path
File.join("pkg/dist")
end
Expand Down
10 changes: 9 additions & 1 deletion lib/beta_builder/deployment_strategies/testflight.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require 'json'
require 'tmpdir'
require 'fileutils'
require 'zip/zip'

module BetaBuilder
module DeploymentStrategies
Expand All @@ -18,14 +19,21 @@ def generate_release_notes(&block)

def deploy
release_notes = get_notes

File.delete(@configuration.built_app_dsym_zip_path) if File.exists?(@configuration.built_app_dsym_zip_path)
Zip::ZipFile.open("#{@configuration.built_app_dsym_zip_path}", Zip::ZipFile::CREATE) do |zipfile|
Dir["#{@configuration.built_app_dsym_path}/**/*"].each {|f| zipfile.add(f,f)}
end

payload = {
:api_token => @configuration.api_token,
:team_token => @configuration.team_token,
:file => File.new(@configuration.ipa_path, 'rb'),
:notes => release_notes,
:distribution_lists => (@configuration.distribution_lists || []).join(","),
:notify => @configuration.notify || false,
:replace => @configuration.replace || false
:replace => @configuration.replace || false,
:dsym => File.new(@configuration.built_app_dsym_zip_path, 'rb')
}
puts "Uploading build to TestFlight..."
if @configuration.verbose
Expand Down