2020-09-05 13:53:43 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
|
|
|
|
readonly clean=${clean:?"true or false: when true, xcodebuild clean will be performed"}
|
2021-12-12 22:39:24 +03:00
|
|
|
readonly download_deps=${download_deps:-false}
|
2020-09-05 13:53:43 +03:00
|
|
|
|
|
|
|
main() {
|
2020-11-16 00:11:01 +03:00
|
|
|
if [[ "${clean}" == true ]]; then
|
2020-09-05 13:53:43 +03:00
|
|
|
local -r cmd="clean build"
|
|
|
|
else
|
|
|
|
local -r cmd="build"
|
|
|
|
fi
|
|
|
|
|
|
|
|
pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null
|
2021-12-12 22:39:24 +03:00
|
|
|
if [[ "${download_deps}" == true ]]; then
|
|
|
|
rm -rf ./VimR/.deps
|
|
|
|
./bin/download_vimr_deps.sh
|
|
|
|
fi
|
|
|
|
|
2020-09-05 13:53:43 +03:00
|
|
|
xcodebuild \
|
|
|
|
-workspace VimR.xcworkspace \
|
|
|
|
-derivedDataPath ./build \
|
|
|
|
-configuration Release \
|
2020-09-06 15:03:11 +03:00
|
|
|
-scheme VimR \
|
|
|
|
-xcconfig ./VimR/Dev.xcconfig \
|
2020-09-05 13:53:43 +03:00
|
|
|
${cmd}
|
|
|
|
popd >/dev/null
|
|
|
|
}
|
|
|
|
|
2020-09-06 09:29:31 +03:00
|
|
|
main
|