App variants: Update script in order to use only on command to merge variant into project folder.

This commit is contained in:
SBiOSoftWhare 2021-08-09 16:33:11 +02:00
parent 27d56cfa56
commit f002b3f9e8

View file

@ -14,7 +14,9 @@ VARIANTS_ROOT_FOLDER="Variants/"
cd .. cd ..
# Get the variant root folder # Get the variant root folder
variant_root_folder="${VARIANTS_ROOT_FOLDER}${VARIANT_NAME}" variant_root_folder="${VARIANTS_ROOT_FOLDER}${VARIANT_NAME}/"
project_root_folder="./"
# Check if variant folder exists # Check if variant folder exists
if [ ! -d "$variant_root_folder" ]; then if [ ! -d "$variant_root_folder" ]; then
@ -24,11 +26,5 @@ fi
echo "Applying app variant: ${VARIANT_NAME}" echo "Applying app variant: ${VARIANT_NAME}"
# Replace fastlane environment variable file # Merge variant directory into project directory
cp -f "${variant_root_folder}/.env.default" fastlane/.env.default rsync -a "${variant_root_folder}" "${project_root_folder}"
# 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/