From d066241ad8e4a0278fdc09571bf14ba193d57114 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 7 Jan 2024 16:36:03 -0800 Subject: [PATCH] iOS: use M.m.p short version and M.m.p.b full version All version information has to be integers, but at least the full version allows a fourth digit which we can increment for local commits. Update the plist fragment and script accordingly. Signed-off-by: Dirk Hohndel --- packaging/ios/Info.plist.in | 4 ++-- packaging/ios/build.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packaging/ios/Info.plist.in b/packaging/ios/Info.plist.in index 68ac73535..2e27d0375 100644 --- a/packaging/ios/Info.plist.in +++ b/packaging/ios/Info.plist.in @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - @CANONICAL_VERSION@ + @SHORT_VERSION@ CFBundleSignature ???? CFBundleVersion - @CANONICAL_VERSION@ + @FULL_VERSION@ LSRequiresIPhoneOS NOTE diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh index ff374a12e..0c781bf0a 100755 --- a/packaging/ios/build.sh +++ b/packaging/ios/build.sh @@ -81,6 +81,8 @@ CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version) echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version 4) echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h +CANONICALVERSION_3=$("$SUBSURFACE_SOURCE"/scripts/get-version 3) +echo "#define CANONICAL_VERSION_STRING_3 \"$CANONICALVERSION_3\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h BUNDLE=org.subsurface-divelog.subsurface-mobile if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then @@ -90,7 +92,7 @@ fi pushd "$SUBSURFACE_SOURCE"/packaging/ios # create Info.plist with the correct versions # shellcheck disable=SC2002 -cat Info.plist.in | sed "s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist +cat Info.plist.in | sed "s/@SHORT_VERSION@/$CANONICALVERSION_3/;s/@FULL_VERSION@/$CANONICALVERSION_4/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist popd if [ "$versionOnly" = "1" ] ; then