Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 7121cb3

Browse files
committed
Update to latest objc-build-scripts
1 parent 3a34dfe commit 7121cb3

2 files changed

Lines changed: 23 additions & 36 deletions

File tree

script/bootstrap

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,12 @@
22

33
export SCRIPT_DIR=$(dirname "$0")
44

5-
##
6-
## Configuration Variables
7-
##
8-
9-
config ()
10-
{
11-
# A whitespace-separated list of executables that must be present and locatable.
12-
: ${REQUIRED_TOOLS="xctool"}
13-
14-
export REQUIRED_TOOLS
15-
}
16-
175
##
186
## Bootstrap Process
197
##
208

219
main ()
2210
{
23-
config
24-
25-
if [ -n "$REQUIRED_TOOLS" ]
26-
then
27-
echo "*** Checking dependencies..."
28-
check_deps
29-
fi
30-
3111
local submodules=$(git submodule status)
3212
local result=$?
3313

@@ -43,19 +23,6 @@ main ()
4323
fi
4424
}
4525

46-
check_deps ()
47-
{
48-
for tool in $REQUIRED_TOOLS
49-
do
50-
which -s "$tool"
51-
if [ "$?" -ne "0" ]
52-
then
53-
echo "*** Error: $tool not found. Please install it and bootstrap again."
54-
exit 1
55-
fi
56-
done
57-
}
58-
5926
bootstrap_submodule ()
6027
{
6128
local bootstrap="script/bootstrap"

script/cibuild

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ config ()
4141
# Individual names can be quoted to avoid word splitting.
4242
: ${SCHEMES:=$(xcodebuild -list -project "$XCODEPROJ" 2>/dev/null | awk -f "$SCRIPT_DIR/schemes.awk")}
4343

44+
# A whitespace-separated list of executables that must be present and locatable.
45+
: ${REQUIRED_TOOLS="xctool"}
46+
4447
export XCWORKSPACE
4548
export XCODEPROJ
4649
export BOOTSTRAP
4750
export XCTOOL_OPTIONS
4851
export SCHEMES
52+
export REQUIRED_TOOLS
4953
}
5054

5155
##
@@ -56,6 +60,12 @@ main ()
5660
{
5761
config
5862

63+
if [ -n "$REQUIRED_TOOLS" ]
64+
then
65+
echo "*** Checking dependencies..."
66+
check_deps
67+
fi
68+
5969
if [ -f "$BOOTSTRAP" ]
6070
then
6171
echo "*** Bootstrapping..."
@@ -78,6 +88,19 @@ main ()
7888
)
7989
}
8090

91+
check_deps ()
92+
{
93+
for tool in $REQUIRED_TOOLS
94+
do
95+
which -s "$tool"
96+
if [ "$?" -ne "0" ]
97+
then
98+
echo "*** Error: $tool not found. Please install it and cibuild again."
99+
exit 1
100+
fi
101+
done
102+
}
103+
81104
find_pattern ()
82105
{
83106
ls -d $1 2>/dev/null | head -n 1
@@ -106,9 +129,6 @@ build_scheme ()
106129
{
107130
local scheme=$1
108131

109-
echo "*** Cleaning $scheme..."
110-
run_xctool -scheme "$scheme" clean >/dev/null || exit $?
111-
112132
echo "*** Building and testing $scheme..."
113133
echo
114134

0 commit comments

Comments
 (0)