forked from tangem/tangem-app-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·74 lines (60 loc) · 1.63 KB
/
bootstrap.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
#!/bin/sh
# set -euo pipefail
# Install "Command line tools" xcode-select --install
# Install Homebrew -> https://brew.sh
# Parse options
usage() {
echo "Usage: $0 [additional options]"
echo
echo " Options:"
echo
echo " --skip-cocoapods - Skip pod install"
echo " --update-submodule - Git submodule update with --remote option"
exit 1;
}
OPT_COCOAPODS=true
OPT_SUBMODULE=false
while test $# -gt 0
do
case "$1" in
--skip-cocoapods)
OPT_COCOAPODS=false
;;
--update-submodule)
OPT_SUBMODULE=true
;;
*)
usage 1>&2
;;
esac
shift
done
echo "🔜 Check & Install dependencies..."
if which -a brew > /dev/null; then
echo "🟢 Homebrew installed. Skipping install"
else
echo "🔴 Homebrew not installed. Start install"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
if which -a mint > /dev/null; then
echo "🟢 Mint installed. Skipping install"
else
echo "🔴 Mint not installed. Start install"
brew install mint
fi
echo "🔄 Mint bootstrap dependencies"
mint bootstrap --mintfile ./Utilites/Mintfile
echo "✅ Dependencies succesfully installed"
echo "🚀 Running SwiftFormat"
mint run [email protected] . --config .swiftformat
echo "🚀 Running SwiftGen"
mint run [email protected] config run --config swiftgen.yml
if [ "$OPT_COCOAPODS" = true ] ; then
echo "🚀 Running pod install"
pod install --repo-update
fi
if [ "$OPT_SUBMODULE" = true ] ; then
echo "🚀 Running submodule remote update"
git submodule update --remote
fi
echo "Bootstrap competed 🎉"