stack_wallet/scripts/app_config/configure_duo.sh

31 lines
838 B
Bash
Raw Normal View History

2024-05-15 23:13:50 +00:00
#!/bin/bash
2024-05-21 21:40:10 +00:00
set -x -e
../app_config/shared/link_assets.sh "stack_duo"
2024-05-15 23:13:50 +00:00
# Configure files for Duo.
export ORIGINAL_NAME="Stack Wallet"
export ORIGINAL_APP_ID="com.cypherstack.stackwallet"
export NEW_NAME="Stack Duo"
export NEW_APP_ID="com.cypherstack.stackduo"
export NEW_VERSION="2.0.0"
export NEW_BUILD="" # Will increment existing build # if empty.
2024-05-15 23:13:50 +00:00
# String replacements.
2024-05-15 23:13:50 +00:00
if [[ "$(uname)" == 'Darwin' ]]; then
# macos specific sed
sed -i '' 's/Wallet/Duo/g' ../../lib/app_config.dart
sed -i '' "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../pubspec.yaml
else
sed -i 's/Wallet/Duo/g' ../../lib/app_config.dart
sed -i "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../pubspec.yaml
fi
# Extract Duo images.
unzip -o stack_duo_assets.zip -d ../../
# Update version & build number.
./update_version.sh -v "${NEW_VERSION}" -b "${NEW_BUILD}"