Download this file
| 1 | #!/bin/sh |
| 2 | set -eu |
| 3 | cd "$(dirname "$0")/.." |
| 4 | if [ "${OFICINA_SKIP_PREPARE:-0}" != 1 ]; then scripts/build-crdt.sh; fi |
| 5 | if [ "${OFICINA_SKIP_PROJECT_GENERATION:-0}" != 1 ]; then xcodegen generate --spec ios/project.yml; fi |
| 6 | case "${1:-simulator}" in |
| 7 | simulator) xcodebuild -project ios/DocsPhone.xcodeproj -scheme DocsPhone -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath build/ios CODE_SIGNING_ALLOWED=NO build ;; |
| 8 | device) : "${OFICINA_DEVELOPMENT_TEAM:?Set your Apple development team ID}" |
| 9 | xcodebuild -project ios/DocsPhone.xcodeproj -scheme DocsPhone -destination 'generic/platform=iOS' -derivedDataPath build/device "DEVELOPMENT_TEAM=$OFICINA_DEVELOPMENT_TEAM" -allowProvisioningUpdates build ;; |
| 10 | *) exit 2 ;; |
| 11 | esac |
| 12 | |