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

Commit

Permalink
Metadata upload is skipped for beta builds
Browse files Browse the repository at this point in the history
Updated tests
  • Loading branch information
KrauseFx committed Feb 1, 2015
1 parent 740f9c0 commit bcbe33c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ beta_ipa do
end
```

and provide `--beta` option when calling `deliver`.
and provide `--beta` option when calling `deliver`. When running `deliver` with the `--beta` flag enabled, it will **not** upload new app metadata.

#### Implement blocks to run unit tests
If you're using [fastlane](http://github.com/krausefx/fastlane), run tests and error blocks there.
Expand Down
20 changes: 13 additions & 7 deletions lib/deliver/deliver_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,21 @@ def run
create_app
verify_app_on_itunesconnect

load_metadata_from_config_json_folder # the json file generated from the quick start
set_app_metadata
set_screenshots
unless is_beta_build?
# App Metdata will not be updated for beta builds

verify_pdf_file
load_metadata_from_config_json_folder # the json file generated from the quick start
set_app_metadata
set_screenshots

additional_itc_information # e.g. copyright, age rating
verify_pdf_file

trigger_metadata_upload
additional_itc_information # e.g. copyright, age rating

trigger_metadata_upload
end

# Always upload a new ipa (except if none was given)
trigger_ipa_upload

call_success_block
Expand Down Expand Up @@ -207,7 +213,7 @@ def set_screenshots
end

def verify_pdf_file
if @deploy_information[Deliverer::ValKey::SKIP_PDF] or is_beta_build?
if @deploy_information[Deliverer::ValKey::SKIP_PDF]
Helper.log.debug "PDF verify was skipped"
else
# Everything is prepared for the upload
Expand Down
2 changes: 0 additions & 2 deletions spec/deliver_process_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
end

it "doesn't show error if production ipa is not given and beta build should be uploaded" do
Deliver::ItunesTransporter.set_mock_file("spec/responses/transporter/download_valid_apple_id.txt")
Deliver::ItunesTransporter.set_mock_file("spec/responses/transporter/upload_valid.txt")
Deliver::ItunesTransporter.set_mock_file("spec/responses/transporter/upload_valid.txt")

Deliver::Deliverer.new('spec/fixtures/Deliverfiles/DeliverfileBetaProductionIpa',
Expand Down
2 changes: 1 addition & 1 deletion spec/example_deliver_files_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@

it "Successful with custom parameters" do
expect(File.exists?@tests_path).to eq(false)
Deliver::ItunesTransporter.set_mock_file("spec/responses/transporter/upload_valid.txt")
Deliver::ItunesTransporter.clear_mock_files # we don't even download the app metadata
Deliver::ItunesTransporter.set_mock_file("spec/responses/transporter/upload_valid.txt") # the ipa file
deliv = Deliver::Deliverer.new("./spec/fixtures/Deliverfiles/DeliverfileCallbacks",
force: true,
Expand Down

0 comments on commit bcbe33c

Please # to comment.