-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
29 lines (23 loc) · 752 Bytes
/
bootstrap.sh
File metadata and controls
29 lines (23 loc) · 752 Bytes
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
#!/bin/bash
# local variables
IS_RUNNING_ON_CI="${CI:-false}"
FAILURE_OUTPUT_COLOR='\033[0;31m'
SUCCESS_OUTPUT_COLOR='\033[0;32m'
NO_OUTPUT_COLOR='\033[0m'
if [[ "$IS_RUNNING_ON_CI" = false ]]; then
# it's necessary to make resolving packages graph work after project generation
echo "${SUCCESS_OUTPUT_COLOR}Killing Xcode to make Resolving Package Graph work."
kill $(ps aux | grep 'Xcode' | awk '{print $2}')
echo "Killed Xcode."
fi
# code generation
mkdir -p Trending/Generated/
mkdir -p DesignSystem/Sources/DesignSystem/Generated/
swiftgen
# project generation
xcodegen generate
if [[ "$IS_RUNNING_ON_CI" = false ]]; then
# it's necessary to make resolving packages graph work after project generation
echo 'Opening Xcode...'
xed .
fi