Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
get approval for external build before distributing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Feb 18, 2016
1 parent d07011a commit 1f0ac5e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/pilot/build_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,19 @@ def distribute_build(uploaded_build, options)
# First, set the changelog (if necessary)
uploaded_build.update_build_information!(whats_new: options[:changelog])

# Submit for internal beta testing
# Submit for review before external testflight is available
if options[:distribute_external]
uploaded_build.client.submit_testflight_build_for_review!(
app_id: uploaded_build.build_train.application.apple_id,
train: uploaded_build.build_train.version_string,
build_number: uploaded_build.build_version,
platform: uploaded_build.platform
)
end

# Submit for beta testing
type = options[:distribute_external] ? 'external' : 'internal'
uploaded_build.build_train.update_testing_status!(true, type)
uploaded_build.build_train.update_testing_status!(true, type, uploaded_build)
return true
end
end
Expand Down

0 comments on commit 1f0ac5e

Please sign in to comment.