2012-06-25 13:14:58 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ "$WORKSPACE" == "" ]; then
|
|
|
|
echo "ERROR: Missing WORKSPACE environment variable."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# remove old and create fresh build directories
|
|
|
|
rm -rf sgBuild
|
|
|
|
rm -rf fgBuild
|
|
|
|
mkdir -p sgBuild
|
|
|
|
mkdir -p fgBuild
|
|
|
|
mkdir -p output
|
|
|
|
rm -rf output/*
|
|
|
|
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
echo "Starting on SimGear"
|
|
|
|
pushd sgBuild
|
2012-06-26 09:22:32 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../simgear
|
2012-06-25 13:14:58 +00:00
|
|
|
|
|
|
|
# compile
|
2013-01-28 16:09:56 +00:00
|
|
|
xcodebuild -configuration RelWithDebInfo -target install build
|
2012-06-25 13:14:58 +00:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make simgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
echo "Starting on FlightGear"
|
|
|
|
pushd fgBuild
|
2012-06-26 09:22:32 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -G Xcode ../flightgear
|
2012-06-25 13:14:58 +00:00
|
|
|
|
2013-01-28 16:09:56 +00:00
|
|
|
xcodebuild -configuration RelWithDebInfo -target install build
|
2012-06-25 13:14:58 +00:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make flightgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
chmod +x $WORKSPACE/dist/bin/osgversion
|
|
|
|
|
|
|
|
|
2012-08-02 09:34:00 +00:00
|
|
|
################################################################################
|
2015-01-18 23:37:36 +00:00
|
|
|
echo "Syncing base packages files from sphere.telascience.org"
|
|
|
|
rsync -avz --filter 'merge base-package.rules' \
|
|
|
|
-e ssh jturner@sphere.telascience.org:/home/jturner/fgdata .
|
|
|
|
|
2012-08-14 11:11:48 +00:00
|
|
|
# run the unlock script now - we need to do this right before code-signing,
|
|
|
|
# or the keychain may automatically re-lock after some period of time
|
2012-08-22 17:35:52 +00:00
|
|
|
unlock-keychain.sh
|
2012-08-14 11:11:48 +00:00
|
|
|
|
2012-06-25 13:14:58 +00:00
|
|
|
echo "Running package script"
|
|
|
|
./hudson_mac_package_release.rb
|