Re: Build Phase per Configuration
Re: Build Phase per Configuration
- Subject: Re: Build Phase per Configuration
- From: Chris Hanson <email@hidden>
- Date: Tue, 13 Nov 2007 17:06:53 -0800
On Nov 13, 2007, at 3:13 PM, David Dunham wrote:
if [ $(CONFIGURATION) -eq "Release" ] then
echo "Signing code"
codesign -v -s ###
fi
Bourne shell syntax is funky. This should be:
if [ "${CONFIGURATION}" = "Release" ]; then
echo "Signing code"
codesign -v -s ###
fi
Xcode will pass all build settings to your script build phase as
environment variables, so you need to use environment syntax to check
them. (Chris E. used Make/Xcode syntax, a common mistake.) The
semicolon between the close-bracket and "then" is necessary as well,
since technically it's another statement or something.
If you're more comfortable with another scripting language like Ruby
or Python, you can just use it instead, by putting the path to its
interpreter in place of /bin/sh in the script build phase's Get Info
window. Xcode will cd to the project root and use the tool you
specify to run your script, after setting its environment to contain
all of the build settings.
-- Chris
/usr/local/bin/scsh
(cond ((get-env "CONFIGURATION")
(progn (echo "Signing code")
(codesign -v -s ###)))
(#t nil))
;;; just kidding, even I'm not crazy enough to use Olin Shivers'
Scheme Shell for this...
_______________________________________________
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