Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 7: Investigate how xcscmblueprint relates to xccheckout #89

Closed
czechboy0 opened this issue Jul 13, 2015 · 16 comments
Closed

Xcode 7: Investigate how xcscmblueprint relates to xccheckout #89

czechboy0 opened this issue Jul 13, 2015 · 16 comments

Comments

@czechboy0
Copy link
Member

Xcode 7 seems to create another file, .xcscmblueprint in a workspace. Look at how it relates to what we pull out of xccheckout and whether there's a way to force Xcode Server to generate it - might make #81 much easier to implement then.

//Edit: Support for parsing xcscmblueprint files added in #141. Still not perfectly clear on their relationship and how to force Xcode to generate them. (I mean, they have almost exactly the same contents, just one is JSON and one is a plist).

@Brett-Best
Copy link
Contributor

@czechboy0 would this allow us to force Xcode to generate an xccheckout file? I can't seem to get it to generate one... I have cloned using both SSH and HTTPS, cloned using both git from terminal, source tree and Xcode. (and then opening the project in Xcode). Have you got any tips for forcing one to generate? I am using cocoa pods as well so I have a workspace.

@czechboy0
Copy link
Member Author

Yeah also try creating a Bot manually from Xcode, that might help. Unfortunately this is something I'm still hunting down, in Xcode 6 the file seemed to have been created right after the project was opened in Xcode. Xcode 7 however seems to be a bit lazier.

@Brett-Best
Copy link
Contributor

@czechboy0 I have tried creating a bot from Xcode by selection Create bot from the menu (didn't work). Is there a way to get around Xcode not generating it? I also tried opening both the workspace and project file in Buildasaur.

@czechboy0
Copy link
Member Author

Technically, yes, but it's a bit tricky. Basically there is a way to create the checkout file manually, but unfortunately that will make it impossible for you to edit Bots created in such a way. I mean, you don't need to do that most of the time, but just heads up.

Let's use this project as an example - in fact, you can see Buildasaur's checkout file here. So what you should do: copy this file, rename it to the name of your project and put it into your project's workspace (to PROJECT_NAME.xcworkspace/xcshareddata/PROJECT_NAME.xccheckout). Then, you'll need to change the following keys to respect your project: IDESourceControlProjectName, the url in IDESourceControlProjectOriginsDictionary, IDESourceControlProjectPath, IDESourceControlProjectURL, IDESourceControlWCCName.

That should be it. What to change them to should be obvious. If you have any questions, please ask away. I hope this will help you to get Buildasaur working - and I'll keep looking for a reliable way to get this file generated by Xcode 👍

@Brett-Best
Copy link
Contributor

Okay so say I edit a bot do I just need to give Buildasaur the new xccheckout?
Also it looks like Buildasaur needs to be setup as a seperate github user? Does that mean I need an organisation account?

Okay cool I will give that a try..

Thanks so much for the help @czechboy0!

@czechboy0
Copy link
Member Author

Buildasaur takes a workspace/project file and it looks inside of it automatically. So now, follow the steps above and once you have that .xccheckout file edited for your project, commit it to your repo so that it stays there. Then, launch Buildasaur and point it at your workspace (which now contains the checkout file) and it should then let you proceed.

Nah, I just use a separate GitHub, but you don't have to. Just generate a personal token in GitHub settings.

No worries, let me know if you got it working! :)

@Brett-Best
Copy link
Contributor

Right I see, I wonder if Xcode isn't generating it because it is in my gitignore... I wasn't planning on committing it to my repo.

Okay cool, is there a way for it to not comment but rather use the github status API so I can use protected branches? EDIT: I see it does this already, can we have it report like 101 test passed, 5 tests failed?

@czechboy0
Copy link
Member Author

Yeah it uses both the GitHub status and posts a comment. You can disable the comments in the UI at the bottom

Yes, actually have comments tell more about the tests etc is the subject of another ticket, so any contributions are welcome 👍 Such as #49.

@Brett-Best
Copy link
Contributor

@czechboy0 okay cool I will look into it... just trying to get my custom xccheckout file to work at the moment.

@Brett-Best
Copy link
Contributor

@czechboy0 I got it to work. Is there a way to build 2 targets? For example: iOS, OS X, watchOS, tvOS?

@czechboy0
Copy link
Member Author

Not at the moment, you would need separate Xcode Bots for this - because the Bot needs a scheme, which points to just one target. However, I am working on multi-project support (#12) , which would make it possible - you'd have separate syncers for your iOS target, OS X target etc.

@Brett-Best
Copy link
Contributor

@czechboy0 okay I wonder if I could create two instances of buildasaur. Okay cool.

@Brett-Best
Copy link
Contributor

@czechboy0 in regard to this actual issue after a PR bot has completed my normal bots give me a warning.
Assertion: An error occurred updating existing checkout. Falling back to a clean checkout.

@czechboy0
Copy link
Member Author

@Brett-Best Could you please move this comment into a new issue? I'll take a look at it and comment there, thanks 👍

@czechboy0
Copy link
Member Author

So in #140 I added support for reading the xcscmblueprint file, which actually fixed the issue for some people who started their project on Xcode 7 (never had a xccheckout file).

To me it looks like they are equivalent, just one is xml and was generated by Xcode 6 and the other is JSON and is used by Xcode 7.

The big issue is that we're not yet able to force Xcode to generate them. Closing this issue and moving to a more specific one: #165.

@czechboy0 czechboy0 modified the milestone: Gladiolus: Buildasaur 1.0 Oct 13, 2015
@Brett-Best
Copy link
Contributor

@czechboy0 yep I agree the generation of the blueprint is the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants