-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhudson_mac_build_release.sh
executable file
·77 lines (57 loc) · 1.9 KB
/
hudson_mac_build_release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/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
PATH=$PATH:$QTPATH
echo "Build path is: $PATH"
# this shoudl not be needed, since this is inside CMAKE_INSTALL_PREFIX, but seemed
# to be necessary all the same
#export PKG_CONFIG_PATH=$WORKSPACE/dist/lib/pkgconfig
cmakeCommonArgs="-G Ninja -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo"
###############################################################################
echo "Starting on SimGear"
pushd sgBuild
cmake ${cmakeCommonArgs} ../simgear
# compile
cmake --build . --target debug_symbols
cmake --build . --target install
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
popd
################################################################################
echo "Starting on FlightGear"
pushd fgBuild
if [ $FG_IS_RELEASE == '1' ]; then
FGBUILDTYPE=Release
else
FGBUILDTYPE=Nightly
fi
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DENABLE_SWIFT:BOOL=ON ${cmakeCommonArgs} ../flightgear
cmake --build . --target debug_symbols
cmake --build . --target install
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
popd
chmod +x $WORKSPACE/dist/bin/osgversion
echo "Running symbol upload script"
./sentry-dSYM-upload-mac.sh
################################################################################
# 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
unlock-keychain.sh
echo "Running package script"
./hudson_mac_package_release.rb