Created
March 20, 2017 21:53
-
-
Save elefantel/c8a7e4bcf531b28c1744d63df69d8836 to your computer and use it in GitHub Desktop.
Run carthage update on each module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
update_encryption_sdk() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on EncryptionSDK' | |
echo '--------------------------------------------------' | |
cd ../encryption-sdk/ | |
run_carthage_update | |
} | |
update_utilities() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on UtilitiesModule' | |
echo '--------------------------------------------------' | |
cd ../utilities/ | |
run_carthage_update | |
} | |
update_routing_sdk() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on RoutingSDK' | |
echo '--------------------------------------------------' | |
cd ../routing-sdk/ | |
run_carthage_update | |
} | |
update_routing_module() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on RoutingModule' | |
echo '--------------------------------------------------' | |
cd ../omf-myportfolio-app-ios/ | |
run_carthage_update | |
} | |
update_portfolio_sdk() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on PortfolioSDK' | |
echo '--------------------------------------------------' | |
cd ../omf-money-account-sdk-ios/ | |
run_carthage_update | |
} | |
update_portfolio_module() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on PortfolioModule' | |
echo '--------------------------------------------------' | |
cd ../omf-money-account-app-ios/ | |
run_carthage_update | |
} | |
update_virtual_bank_app() { | |
echo '--------------------------------------------------' | |
echo 'Running Carthage update on VirtualBankApp' | |
echo '--------------------------------------------------' | |
cd ../omf-mobile-container-app-ios/ | |
run_carthage_update | |
} | |
run_carthage_update() { | |
carthage update --no-use-binaries --platform iOS | |
} | |
update_all() { | |
clone_encryption_sdk && clone_utilities && clone_routing_sdk && clone_routing_module && clone_portfolio_sdk && clone_portfolio_module && clone_virtual_bank_app | |
} | |
#loop through commandline arguments arguments | |
for i in "$@"; do | |
if [ "$i" = "encrypt" ] | |
then | |
update_encryption_sdk | |
elif [ "$i" = "utilities" ] | |
then | |
update_utilities | |
elif [ "$i" = "routingsdk" ] | |
then | |
update_routing_sdk | |
elif [ "$i" = "routingmodule" ] | |
then | |
update_routing_module | |
elif [ "$i" = "portfoliosdk" ] | |
then | |
update_portfolio_sdk | |
elif [ "$i" = "portfoliomodule" ] | |
then | |
update_portfolio_module | |
elif [ "$i" = "app" ] | |
then | |
update_virtual_bank_app | |
elif [ "$i" = "all" ] | |
then | |
update_all | |
else | |
echo "====== ERROR: Incorrect Module Code ======" | |
echo "====== Valid (Code = Module) argument ======" | |
echo "encrypt: EncryptionSDK" | |
echo "utilities: UtilitiesModule" | |
echo "routingsdk: RoutingSDK" | |
echo "routingmodule: RoutingModule" | |
echo "portfoliosdk: PortfolioSDK" | |
echo "portfoliomodule: PortfolioModule" | |
echo "app: VirtualBankApp" | |
echo "all: All Modules" | |
fi | |
done | |
if [[ $# -eq 0 ]] | |
then | |
echo "====== ERROR: No Module Code Entered ======" | |
echo "====== Valid Build (Code = Module) argument: ======" | |
echo "encrypt: EncryptionSDK" | |
echo "utilities: UtilitiesModule" | |
echo "routingsdk: RoutingSDK" | |
echo "routingmodule: RoutingModule" | |
echo "portfoliosdk: PortfolioSDK" | |
echo "portfoliomodule: PortfolioModule" | |
echo "app: VirtualBankApp" | |
echo "all: All Modules" | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment