betabuilder
betabuilder copied to clipboard
Xcodebuild create the build output in the same dir
It seems that if you call xcodebuild command from the command line as betabuilder does all the build product are placed in ./build and not in the DerivedData folder. This means that for example rake beta:archive doesn't work because wasn't able to read the output because it expect the build output in a different folder
Have you configured the build location in your Rake file?
config.build_dir = :derived
This will become the default in 0.8 (Xcode 3 support is deprecated but will not be removed until 0.8).
Yes, but the problem seems regarding the xcodebuild command.
If i execute the plain xcodebuild -target 'Test' -configuration 'Ad-Hoc' -sdk iphoneos build
i've got the same issue
Yes, I'm seeing this too. This appears to be an issue with xcodebuild though, not betabuilder.
What problem is this causing you?
rake beta:archive
fail because it can't parse the build output.
OK, something odd is definitely going on because xcodebuild should be using the derived data location and I'm sure it used to. I'm looking into this now.
It seems that if you specify a -project and -target using xcodebuild, it builds to PROJECT_DIR/build but if you specify the workspace (all projects have an implicit workspace in YourProject.xcodeproj/project.xcworkspace) and a scheme it uses the derived data directory.
Can you try configuring your betabuilder rake task to use a workspace/scheme and let me know if that works.
This is my config:
require 'rubygems'
require 'betabuilder'
BetaBuilder::Tasks.new do |config|
config.target = "Test"
config.configuration = "Ad-Hoc"
config.build_dir = :derived
config.xcode4_archive_mode = true
config.workspace_path = "Test.xcodeproj/project.xcworkspace"
config.scheme = "Test"
config.app_name = "Test"
end
And still getting the following error:
......
** BUILD SUCCEEDED **
Archiving build...
rake aborted!
Cannot parse build_dir from build output.
Try removing the target setting, wiping the build dir then running again. Check that it's no longer using a build dir.
I forget to mention the fact that, as you pointed out, using the workspace/scheme xcodebuild output in the derived data directory.
I've removed the target settings but still got error. I'm looking into your gem's source code and try to find out what's wrong.
this is the output with --trace enabled
Archiving build...
rake aborted!
Cannot parse build_dir from build output.
/Library/Ruby/Gems/1.8/gems/betabuilder-0.7.4.1/lib/beta_builder.rb:93:in derived_build_dir_from_build_output' /Library/Ruby/Gems/1.8/gems/betabuilder-0.7.4.1/lib/beta_builder.rb:80:in
built_app_path'
/Library/Ruby/Gems/1.8/gems/betabuilder-0.7.4.1/lib/beta_builder/archived_build.rb:60:in save_to' /Library/Ruby/Gems/1.8/gems/betabuilder-0.7.4.1/lib/beta_builder.rb:174:in
define'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in
synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in
invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in
top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in
top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in run' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in
standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33 /usr/bin/rake:19:in
load'
/usr/bin/rake:19
Tasks: TOP => beta:archive
Any news? Can you reproduce the issue?
Just ran into this same issue - seems to be breaking because 0.7.4.1 wants the path to be quoted and it isn't necessarily in the Xcode output. It's fixed in pull request #30 (https://github.com/lukeredpath/betabuilder/pull/30, which is merged into master), so changing your Gemfile to refer to Github master should do the trick. Or at least, it did for me. Would be awesome if there was a point release to fix this on Rubygems though.
@lukabernardi - could you confirm if this works for you? If so I'll get a point release out ASAP.
Ultimately, the fix would be to find a more reliable way of getting the build directory, which I'm hoping to find some time for soon.
I confirm that now works fine. Thanks!
@lukeredpath couldn't you tap into the environment vars that Xcode is setting by that point in the script?
I'll second that it would be nice for a minor release to update the gems for this. I just stumbled my way through this manually. now i'm getting hung up on the CFBundleIconFiles stuff :-\