Skip to content
Browse files

Don't assume scheme for the derived data folder.

Correct an issue where the first derived path found contains a file, leading to a double forward slash in the calculated path.
Raise an ArgumentError if the configuration is missing target AND app_name, which would lead to a bad path.
  • Loading branch information...
1 parent 936d9b0 commit b8730fc0b482d9abe826d48d1ca9a56273ac98cc @subdigital subdigital committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/beta_builder.rb
5 lib/beta_builder.rb
@@ -48,6 +48,7 @@ def archive_name
def app_file_name
+ raise ArgumentError, "app_name or target must be set in the BetaBuilder configuration block" if app_name.nil? && target.nil?
if app_name
@@ -75,8 +76,8 @@ def derived_build_dir_from_build_output
output ="build.output")
# yes, this is truly horrible, but unless somebody else can find a better way...
- reference = output.split("\n").grep(/Xcode\/DerivedData\/#{scheme}-(.*)/).first.split(" ").last
- derived_data_directory = reference.split("/Build/Products").first
+ reference = output.split("\n").grep(/Xcode\/DerivedData\/(.*)-(.*)/).first.split(" ").last
+ derived_data_directory = reference.split("/Build/Products/").first

0 comments on commit b8730fc

Please sign in to comment.
Something went wrong with that request. Please try again.