Browse files

Added dry run and verbose for testflight

  • Loading branch information...
1 parent 0600c91 commit 4c51522fee0dad490868ac01bb285ae08ff6149d Anthony Broussard committed with subdigital Aug 10, 2011
Showing with 14 additions and 2 deletions.
  1. +3 −1 lib/beta_builder.rb
  2. +11 −1 lib/beta_builder/deployment_strategies/testflight.rb
View
4 lib/beta_builder.rb
@@ -19,7 +19,9 @@ def initialize(namespace = :beta, &block)
:scheme => nil,
:app_name => nil,
:xcode4_archive_mode => false,
- :skip_clean => false
+ :skip_clean => false,
+ :verbose => false,
+ :dry_run => false
)
@namespace = namespace
yield @configuration if block_given?
View
12 lib/beta_builder/deployment_strategies/testflight.rb
@@ -17,15 +17,25 @@ def generate_release_notes(&block)
end
def deploy
+ release_notes = get_notes
payload = {
:api_token => @configuration.api_token,
:team_token => @configuration.team_token,
:file => File.new(@configuration.ipa_path, 'rb'),
- :notes => get_notes,
+ :notes => release_notes,
:distribution_lists => (@configuration.distribution_lists || []).join(","),
:notify => @configuration.notify || false
}
puts "Uploading build to TestFlight..."
+ if @configuration.verbose
+ puts "ipa path: #{@configuration.ipa_path}"
+ puts "release notes: #{release_notes}"
+ end
+
+ if @configuration.dry_run
+ puts '** Dry Run - No action here! **'
+ return
+ end
begin
response = RestClient.post(ENDPOINT, payload, :accept => :json)

0 comments on commit 4c51522

Please sign in to comment.