forked from organicmaps/organicmaps-tmp
[ios] Automated version generation and upload into the store
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
71bc89c94a
commit
9ea81669f6
4 changed files with 76 additions and 6 deletions
|
@ -4451,6 +4451,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = "OMaps-Debug.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 0;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 9Z6432XD7L;
|
||||
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = MetalContextFactory.mm;
|
||||
|
@ -4460,6 +4461,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2021.06.20;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.organicmaps.debug;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "CarPlay Debug";
|
||||
|
@ -4472,6 +4474,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = "OMaps-Release.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 0;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = 9Z6432XD7L;
|
||||
"EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*]" = MetalContextFactory.mm;
|
||||
|
@ -4481,6 +4484,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2021.06.20;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.organicmaps;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "CarPlay Release";
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
@ -56,7 +54,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
@ -76,7 +74,9 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
|
|
68
iphone/upload_to_appstore.sh
Executable file
68
iphone/upload_to_appstore.sh
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env bash
|
||||
# Archives and uploads the release into the AppStore.
|
||||
# Assumes that all certificates and CarPlay provisioning profiles are properly set up in XCode.
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$(dirname "$0")" && pwd -P )"
|
||||
cd "$SCRIPT_DIR/.."
|
||||
./configure.sh git@github.com:organicmaps/organicmaps-keys
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# Generate version numbers.
|
||||
DATE_OF_LAST_COMMIT=$(git log -1 --date=format:%Y-%m-%d --pretty=format:%cd)
|
||||
NUMBER_OF_COMMITS_ON_THAT_DAY=$(git rev-list --count --after="${DATE_OF_LAST_COMMIT}T00:00:00" HEAD)
|
||||
# Replace '-' with '.'
|
||||
IOS_VERSION="${DATE_OF_LAST_COMMIT//-/.}"
|
||||
|
||||
BUILD_DIR="$SCRIPT_DIR/build"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
ARCHIVE_PATH="$BUILD_DIR/OM-$IOS_VERSION-$NUMBER_OF_COMMITS_ON_THAT_DAY.xcarchive"
|
||||
IPA_PATH="$BUILD_DIR"
|
||||
rm -rf "$ARCHIVE_PATH"
|
||||
|
||||
|
||||
# Build release archive.
|
||||
xcodebuild archive \
|
||||
-workspace "$SCRIPT_DIR/../xcode/omim.xcworkspace" \
|
||||
-configuration Release \
|
||||
-scheme OMaps \
|
||||
-archivePath "$ARCHIVE_PATH" \
|
||||
MARKETING_VERSION="$IOS_VERSION" \
|
||||
CURRENT_PROJECT_VERSION="$NUMBER_OF_COMMITS_ON_THAT_DAY"
|
||||
|
||||
|
||||
# Create a plist with upload options.
|
||||
PLIST="$BUILD_DIR/export.plist"
|
||||
cat > "$PLIST" <<EOM
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>destination</key>
|
||||
<string>upload</string>
|
||||
<key>method</key>
|
||||
<string>app-store</string>
|
||||
<key>teamID</key>
|
||||
<string>9Z6432XD7L</string>
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>app.organicmaps</key>
|
||||
<string>CarPlay AppStore</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
EOM
|
||||
|
||||
# Upload build to the AppStore.
|
||||
xcodebuild -exportArchive \
|
||||
-archivePath "$ARCHIVE_PATH" \
|
||||
-exportOptionsPlist "$PLIST"
|
||||
|
||||
|
||||
# Tag and push on successful upload.
|
||||
# Note0: Requires write access to the repo.
|
||||
# Note1: Remote 'origin' should be organicmaps git repo.
|
||||
TAG="$IOS_VERSION-$NUMBER_OF_COMMITS_ON_THAT_DAY"
|
||||
git tag "$TAG"
|
||||
git push origin "$TAG"
|
|
@ -1,5 +1,3 @@
|
|||
CURRENT_PROJECT_VERSION = 2021.06.20
|
||||
|
||||
// Paths
|
||||
OMIM_ROOT = $(PROJECT_DIR)/../..
|
||||
QT_PATH = /usr/local/opt/qt5
|
||||
|
|
Loading…
Add table
Reference in a new issue