Add The Setup's env when Xcode copy files to bundle.

This commit is contained in:
Corey Johnson
2012-09-17 15:35:55 -07:00
parent 8088bda8b1
commit 61c8068171
2 changed files with 14 additions and 6 deletions

View File

@@ -144,9 +144,7 @@
{
'postbuild_name': 'Copy and Compile Static Files',
'action': [
'rake',
'--trace',
'copy-files-to-bundle',
'script/copy-files-to-bundle'
],
},
{
@@ -326,9 +324,7 @@
{
'postbuild_name': 'Copy and Compile Static Files',
'action': [
'rake',
'--trace',
'copy-files-to-bundle',
'script/copy-files-to-bundle'
],
},
],

12
script/copy-files-to-bundle Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
# This can only be run by xcodebuild!
# Because of the way xcodebuild invokes external scripts we need to load
# The Setup's environment ourselves. If this isn't done, things like the
# node shim won't be able to find the stuff they need.
if [ -f /opt/github/env.sh ]; then
source /opt/github/env.sh
fi
rake --trace copy-files-to-bundle