forked from facebook/facebook-ios-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-projects.sh
executable file
·70 lines (49 loc) · 1.33 KB
/
generate-projects.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
#!/bin/sh
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
EXPECTED_XCODEGEN_VERSION="2.24.0"
RESET='\033[0m'
YELLOW='\033[1;33m'
pgrep -f '/Applications/Xcode.*\.app/Contents/MacOS/Xcode' > /dev/null
if [ $? -eq 0 ]; then
XCODE_WAS_OPEN="true"
echo "⚠️ ${YELLOW}Closing Xcode!${RESET}"
killall Xcode || true
fi
if ! command -v xcodegen >/dev/null; then
echo "WARNING: Xcodegen not installed, run 'brew install xcodegen' or visit https://github.com/yonaskolb/XcodeGen"
exit
fi
VERSION=$( xcodegen --version )
if [ "$VERSION" != "Version: $EXPECTED_XCODEGEN_VERSION" ]; then
echo "Incorrect xcodegen version. Please install or upgrade to version $EXPECTED_XCODEGEN_VERSION"
exit
fi
cd FBSDKCoreKit_Basics || exit
xcodegen generate
cd ..
cd FBAEMKit || exit
xcodegen generate
cd ..
cd FBSDKCoreKit || exit
xcodegen generate
cd ..
cd TestTools || exit
xcodegen generate
cd ..
cd FBSDKLoginKit || exit
xcodegen generate
cd ..
cd FBSDKShareKit || exit
xcodegen generate
cd ..
cd FBSDKGamingServicesKit || exit
xcodegen generate
cd ..
if [ $XCODE_WAS_OPEN ]; then
echo "${YELLOW}Reopening FacebookSDK.xcworkspace${RESET}"
open FacebookSDK.xcworkspace
fi