| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# Usage: the first argument selects the build type: |
| 4 |
# - release, to build release only |
| 5 |
# - debug, to build debug only |
| 6 |
# - continuous, to build release and debug |
| 7 |
# - presubmit, for presubmit builds |
| 8 |
# |
| 9 |
# The default is release |
| 10 |
|
| 11 |
echo "This script is intended to run in a CI environment and may modify your current environment." |
| 12 |
echo "Please refer to BUILDING.md for more information." |
| 13 |
|
| 14 |
read -r -p "Do you wish to proceed (y/n)? " choice |
| 15 |
case "${choice}" in |
| 16 |
y|Y) |
| 17 |
echo "Build will proceed..." |
| 18 |
;; |
| 19 |
n|N) |
| 20 |
exit 0 |
| 21 |
;; |
| 22 |
*) |
| 23 |
exit 0 |
| 24 |
;; |
| 25 |
esac |
| 26 |
|
| 27 |
set -e |
| 28 |
set -x |
| 29 |
|
| 30 |
source `dirname $0`/../common/ci-common.sh |
| 31 |
source `dirname $0`/ci-common.sh |
| 32 |
source `dirname $0`/../common/build-common.sh |
| 33 |
|
| 34 |
pushd `dirname $0`/../.. > /dev/null |
| 35 |
|
| 36 |
# If we're generating an archive for release or continuous builds, then we'll also build for the |
| 37 |
# simulator and create universal libraries. |
| 38 |
BUILD_SIMULATOR= |
| 39 |
if [[ "${GENERATE_ARCHIVES}" ]]; then |
| 40 |
BUILD_SIMULATOR="-s -l" |
| 41 |
fi |
| 42 |
|
| 43 |
./build.sh -i -p ios -c $BUILD_SIMULATOR $GENERATE_ARCHIVES $BUILD_DEBUG $BUILD_RELEASE |
| 44 |
|