• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to get project version in shell script phase?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get project version in shell script phase?


  • Subject: Re: how to get project version in shell script phase?
  • From: Marc Respass <email@hidden>
  • Date: Wed, 28 Feb 2007 15:04:29 -0500


On Feb 28, 2007, at 2:34 PM, James Bucanek wrote:

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.

Thanks James. The version is set in the Info.plist. I was hoping to set the version for the project and then get that version in my shell script. I see the environment printed out when the script is run and I don't see a version there. I looked harder and found the build setting CURRENT_PROJECT_VERSION which is blank by default so I filled it with my information. Not as good as I'd like but better than nothing :)


Marc
_______________________________________________
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


  • Follow-Ups:
    • Re: how to get project version in shell script phase?
      • From: Brian Smith <email@hidden>
References: 
 >Re: how to get project version in shell script phase? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: how to get project version in shell script phase?
  • Next by Date: Re: UNIX SDK & Compiling for XCode
  • Previous by thread: Re: how to get project version in shell script phase?
  • Next by thread: Re: how to get project version in shell script phase?
  • Index(es):
    • Date
    • Thread