Created
November 22, 2017 08:28
-
-
Save mokagio/02745f700c9087ff6e6d528cf77bd14c to your computer and use it in GitHub Desktop.
CQC day 8 bootstrap script
This file contains hidden or 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 | |
# | |
# Setup your local copy of the app. Run this script immediately after cloning | |
# the codebase. | |
# | |
set -eo pipefail | |
# First ensure all the required tools are available | |
if ! which brew > /dev/null; then | |
echo "Please install Homebrew. See https://brew.sh/" | |
exit 1 | |
fi | |
if ! which carthage > /dev/null; then | |
brew update && brew install carthage | |
fi | |
if ! which bundle > /dev/null; then | |
gem install bundler | |
fi | |
# Setup Ruby tools | |
bundle check || bundle install | |
# Setup dependencies via CocoaPods | |
bundle exec pod install | |
# This is an hack we need to run to get the Pods to code sign under our custom | |
# deployment process. | |
ruby ./set_all_pods_to_automatic_prov_style.rb | |
# Setup dependencies via Carthage | |
# _Yes, using both CocoaPods and Carthage. That's due to the lack of time to | |
# migrate the Pods dependencies to Carthage one. | |
carthage bootstrap --no-use-binaries --use-ssh --platform iOS | |
# Generate file for local configs | |
if ! [ -f .env ]; then | |
cp .env-template .env | |
echo "Created .env file. Make sure to fill it with the right values and credentials." | |
fi | |
echo "All done 👍." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment