summaryrefslogtreecommitdiffstats
path: root/packaging/ios/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/ios/build.sh')
-rwxr-xr-xpackaging/ios/build.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index bab459fcd..bef6904a2 100755
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -4,7 +4,7 @@
set -x
set -e
-PRODUCT_BUNDLE_IDENTIFIER="\$(PRODUCT_BUNDLE_IDENTIFIER)"
+doVersion=$1
DEBUGRELEASE="Release"
DRCONFIG="release"
ARCHS="armv7 arm64 x86_64"
@@ -14,12 +14,6 @@ TARGET2="Device"
while [[ $# -gt 0 ]] ; do
arg="$1"
case $arg in
- -official)
- # build an app identified as org.subsurface-divelog.subsurface-mobile
- # without having to set this explicitly in Xcode (this way this works,
- # e.g., in Travis)
- PRODUCT_BUNDLE_IDENTIFIER="org.subsurface-divelog.subsurface-mobile"
- ;;
-debug)
# build for debugging
DEBUGRELEASE="Debug"
@@ -86,10 +80,15 @@ echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > subsurface-mobile/ssrf-versi
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> subsurface-mobile/ssrf-version.h
echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> subsurface-mobile/ssrf-version.h
+BUNDLE=org.subsurface-divelog.subsurface-mobile
+if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then
+ BUNDLE=${IOS_BUNDLE_PRODUCT_IDENTIFIER}
+fi
+
# create Info.plist with the correct versions
-cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$PRODUCT_BUNDLE_IDENTIFIER/" > Info.plist
+cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist
-if [ "$1" = "version" ] ; then
+if [ "$doVersion" = "version" ] ; then
exit 0
fi