Re: how to get project version in shell script phase?
Re: how to get project version in shell script phase?
- Subject: Re: how to get project version in shell script phase?
- From: James Bucanek <email@hidden>
- Date: Wed, 28 Feb 2007 12:34:45 -0700
Marc Respass wrote on Wednesday, February 28, 2007:
>I have a shell script phase that builds a disk image. It works well
>and it's based on a script found at (http://www.mygreenjar.com/
>2006/09/10/dmg-build-phase-for-xcode-projects/). The thing is that my
>project's name and the disk image I want to create are not the same.
>I want the disk image name to append the version of the project. Of
>course, I can just modify the script but that's such a drag. I'm
>hoping there's a way to get the value for CFBundleVersion in
>Info.plist but I can't find it. I did notice the variable
>VERSIONPLIST_PATH which points to a version.plist but that file does
>not exist and I don't know for sure how it would help. I read through
>the docs and searched at Apple's dev site but I either have the wrong
>search criteria or there's nothing out there. Any help is appreciated.
If the version is in a source file, you could write an awk/perl/ruby/whatever script to extract the version from the source plist or header file.
If your version is defined in a build setting, you'll find the value in an environment variable. All build setttings are resolved and set as environment variables before the build script is executed.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden