From caa6d03ecf8d7a6ecb838c24aa202842518a96fa Mon Sep 17 00:00:00 2001 From: Aki Koskinen Date: Mon, 5 Nov 2012 12:46:49 +0200 Subject: [PATCH] Produce Frankified.app from the compiled app more carefully With the --noclean option there are possibly more than one *.app directories in the frankified_build directory. At least discard the Frankified.app directory as the source directory. Copy recursively instead of moving so that the source directory remains ready for the next build. --- gem/lib/frank-cucumber/cli.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gem/lib/frank-cucumber/cli.rb b/gem/lib/frank-cucumber/cli.rb index e9a21d4c..b30833b2 100644 --- a/gem/lib/frank-cucumber/cli.rb +++ b/gem/lib/frank-cucumber/cli.rb @@ -80,7 +80,9 @@ def build run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts} -configuration Debug -sdk iphonesimulator DEPLOYMENT_LOCATION=YES DSTROOT="#{build_output_dir}" FRANK_LIBRARY_SEARCH_PATHS="\\"#{frank_lib_directory}\\""| - FileUtils.mv( Dir.glob( "#{build_output_dir}/*.app" ).first, frankified_app_dir ) + app = Dir.glob("#{build_output_dir}/*.app").delete_if { |x| x =~ /\/#{app_bundle_name}$/ } + app = app.first + FileUtils.cp_r("#{app}/.", frankified_app_dir) fix_frankified_apps_bundle_identifier