mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
App variants: Add script to choose an app variant from "Variants" folder.
This commit is contained in:
31
Variants/setup_app_variant.sh
Executable file
31
Variants/setup_app_variant.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If you want to use an existing build variant or your own one you have to choose or create a folder with your variant name in "Variants" folder.
|
||||
|
||||
if [ ! $# -eq 1 ]; then
|
||||
echo "Usage: ./setup_app_variant.sh [variant folder name]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get variant name from user input
|
||||
VARIANT_NAME=$1
|
||||
VARIANTS_ROOT_FOLDER="Variants/"
|
||||
|
||||
cd ..
|
||||
|
||||
# Get the variant root folder
|
||||
variant_root_folder="${VARIANTS_ROOT_FOLDER}${VARIANT_NAME}"
|
||||
|
||||
# Check if variant folder exists
|
||||
if [ ! -d "$variant_root_folder" ]; then
|
||||
echo "Variant folder: ${variant_root_folder} do not exists"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Applying app variant: ${VARIANT_NAME}"
|
||||
|
||||
# Replace build identifiers and provisioning profiles
|
||||
cp -f "${variant_root_folder}/AppIdentifiers.xcconfig" Config/AppIdentifiers.xcconfig
|
||||
|
||||
# Replace app icon
|
||||
rsync -a "${variant_root_folder}/AppIcon.appiconset/" Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/
|
||||
Reference in New Issue
Block a user