cedarbdd / cedar

BDD-style testing using Objective-C
http://groups.google.com/group/cedar-discuss
1.19k stars 140 forks source link

./installCodeSnippetsAndTemplates fails #338

Closed codeman9 closed 9 years ago

codeman9 commented 9 years ago

pulling the latest from HEAD and trying to run this install script fails with

=== BUILD TARGET Cedar-iOS-Framework OF PROJECT Cedar WITH CONFIGURATION Release ===

Check dependencies
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'

[Failed] Command: xcodebuild -project Cedar.xcodeproj -configuration Release SYMROOT="~/Desktop/xcodeplugins/cedar/build" clean build  -target "Cedar-iOS-Framework"
[Failed] Also logged to: ~/Desktop/xcodeplugins/cedar/build/frameworks.ios.dynamic.build.log

/Users/x27s/Desktop/xcodeplugins/cedar/Rakefile:62:in `run'
/Users/x27s/Desktop/xcodeplugins/cedar/Rakefile:149:in `block in build'
/Users/x27s/Desktop/xcodeplugins/cedar/Rakefile:97:in `fold'
/Users/x27s/Desktop/xcodeplugins/cedar/Rakefile:148:in `build'
/Users/x27s/Desktop/xcodeplugins/cedar/Rakefile:454:in `block (3 levels) in <top (required)>'
Tasks: TOP => install => dist:prepare => frameworks:build => frameworks:ios:build
(See full trace by running task with --trace)

*** It seems something went wrong installing the code snippets and templates.  Check the build output for errors. ***
tjarratt commented 9 years ago

Thanks for reporting this @codeman9, this is indeed a bummer. This seems to have been introduced by the new iOS Framework target for Cedar that was added recently (e4a6b833688a6504f237f50249c8626adc867338). It seems that building a framework for iOS 8+ requires code signing by default. The reason this is relevant is that running this shell script actually builds and installs a cedar framework, in addition to installing the code snippets and templates.

This has perplexed me for a long time. I'd love it if this wasn't the case, because I find running this script often takes a long time, and occasionally fails, as you discovered. In lieu of this "installCodeSnippetsAndTemplates" script invoking the rake install task, which does too much, perhaps we could expose a single rake task for installing the code snippets and templates (without building and installing cedar) and this shell script could just refer to that rake task?

briancroom commented 9 years ago

I don't know the full history of these scripts, but I believe that the framework is built because, until https://github.com/pivotal/cedar/pull/314 was merged, the Cedar project templates included a copy of Cedar.framework. Since those templates no longer exist, I can't think of any reason to continue building the framework as a part of the snippet/template installation process.

tjarratt commented 9 years ago

Hey @codeman9 I think we've fixed this in a recent commit. Could you try using HEAD of the master branch and letting us know if's resolved for you?

codeman9 commented 9 years ago

Works.