adamwaite / iOS-Build-Kit

☠️ BuildKit is a modular command line interface for automating iOS project builds. Bundled build tasks include: Increment app version • Xcode build • Overlay version number on icon files • Run unit tests • Create .ipa artefact.
MIT License
568 stars 54 forks source link

Proposal: use xcpretty instead of xctool #7

Closed delebedev closed 10 years ago

delebedev commented 10 years ago

Is there any particular reason to use pretty 'heavy' dependensy such as xctool? Since xcode5 xcodebuild can be used to run tests from command line, and from my experience with xctool it sometimes fails to run the tests in different conditions.

Why not to use https://github.com/mneorr/XCPretty? It's pretty lightweight and build on top of xcodebuild.

adamwaite commented 10 years ago

That's a much better idea actually since it's a gem too, forgot that it existed! I will work on a new version as soon as get a little time. Should be able to release a version at some point next week, in Spain at the moment.

delebedev commented 10 years ago

I have some time to get this feature to work, the idea to use it something like this:

      def build_command
        workspace_arg = "-workspace \"#{@config.workspace}\""
        scheme_arg = "-scheme \"#{@config.scheme}\""
        "xcodebuild #{workspace_arg} #{scheme_arg} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO test | xcpretty"
      end

or do you want to manually capture xcodebuild output and pass it to XCPretty::Printer.new?

adamwaite commented 10 years ago

Your solution sounds good to me. Up to you though, whatever you think is best.

delebedev commented 10 years ago

As easy first step, I simply added xcpretty to script command. In the future we can use it as object to configure reporters and output in more OOD way.

nemesis commented 10 years ago

Hello, guys! Maybe use xcpretty -c? Formats the output with color. :octocat:

delebedev commented 10 years ago

@nemesis yep, forgot about it

adamwaite commented 10 years ago

fixed with https://github.com/adamwaite/iOS-Build-Kit/pull/14