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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-01-07 16:36:03 -08:00
parent 5fcfe5298a
commit d066241ad8
2 changed files with 5 additions and 3 deletions

View file

@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@CANONICAL_VERSION@</string>
<string>@SHORT_VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@CANONICAL_VERSION@</string>
<string>@FULL_VERSION@</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NOTE</key>

View file

@ -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