How to check using a script if project is opened in XCode?

Posted by delirus on Stack Overflow See other posts from Stack Overflow or by delirus
Published on 2011-01-06T09:50:22Z Indexed on 2011/01/06 9:53 UTC
Read the original article Hit count: 198

Filed under:
|
|

Hi,

I'd like to introduce build number feature for my iPhone project and increase it automatically with every commit to my git repo. I plan to do it using Apple's agvtool, which recommends that project is not opened in XCode at the time

So my questions are: 1) So far I know that I need to make an executable script from .git/hooks/pre-commit.sample. How to do the scripting to check if certain project is opened in XCode?

2) pre-commit.sh will be executed upon calling git commit with no args, so whenever someone will commit with -a option, I won't have my build number updated. Is there any way to workaround this?

Cheers

© Stack Overflow or respective owner

Related posts about xcode

Related posts about git