Skip to content

Commit

Permalink
Add ruby update to post clone
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed May 8, 2024
1 parent 4e41ad9 commit ff159a6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 29 additions & 2 deletions ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,38 @@
# include helpers
source retry.sh

echo "###===== Installing Cocoapods"
echo "###===== Installing Node"
retry 5 brew install node

echo "###===== Installing Homebrew"
echo "###===== Installing Cocoapods"
retry 5 brew install cocoapods

echo "###===== Add Ruby to PATH"

# Determine Homebrew installation location
if [[ -d "/opt/homebrew" ]]; then
HOMEBREW_PREFIX="/opt/homebrew"
else
HOMEBREW_PREFIX="/usr/local"
fi

echo "export PATH=\"$HOMEBREW_PREFIX/opt/ruby/bin:\$PATH\"" >> ~/.zshrc
source ~/.zshrc

echo "###===== Verify Ruby installation"
ruby -v

echo "###===== Install bundler"
$HOMEBREW_PREFIX/opt/ruby/bin/gem install bundler:2.1.4 --user-install

echo "###===== Ensure the gem bin directory is in the PATH"
echo "export PATH=\"$(ruby -e 'puts Gem.user_dir')/bin:\$PATH\"" >> ~/.zshrc

echo "###===== Source the updated .zshrc to apply changes in the current script"
source ~/.zshrc

echo "###===== Verify bundler installation"
bundler -v

echo "###===== Installing Yarn"
npm install --global yarn
4 changes: 4 additions & 0 deletions ios/ci_scripts/ci_pre_xcodebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ EOF
# echo "####===== Temporary ENV Debug"
# cat ../../.env

echo "####===== Verify working directory"
cd ../../
pwd

echo "####===== Run: yarn install"
yarn install

Expand Down

0 comments on commit ff159a6

Please sign in to comment.