Skip to content

Commit

Permalink
Update ci_post_clone.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Oct 14, 2024
1 parent 5f8b56d commit da9688d
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions apps/box/ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@

set -e

# Install and activate Ruby
RUBY_VERSION=3.3.5
brew install ruby@$RUBY_VERSION
echo 'export PATH="/usr/local/opt/ruby@$RUBY_VERSION/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
gem install bundler

# Install Node.js
NODE_VERSION=18
NODE_VERSION=20
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install $NODE_VERSION
nvm use $NODE_VERSION
echo "export NODE_BINARY=$(command -v node)" > .xcode.env

# Install Yarn
npm install -g yarn
Expand All @@ -17,7 +25,7 @@ npm install -g yarn
brew install cocoapods

# Navigate to the project root
cd /Volumes/workspace/repository
cd $CI_WORKSPACE

# Print current directory for debugging
pwd
Expand All @@ -26,16 +34,27 @@ ls -la
# Install yarn dependencies
yarn install

# Run ensure:symlink
npm run ensure:symlink

# Navigate to the iOS directory
cd apps/box/ios

# Install pods
pod install
pod install --repo-update

# Return to the project root
cd /Volumes/workspace/repository
cd $CI_WORKSPACE

# Get npm package version
NPM_PACKAGE_VERSION=$(node -p "require('./apps/box/package.json').version")

# Set Xcode build number
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $NPM_PACKAGE_VERSION" "./apps/box/ios/Box/Info.plist"

# Print Node.js, npm, and Yarn versions for debugging
# Print versions for debugging
node --version
npm --version
yarn --version
yarn --version
ruby --version
pod --version

0 comments on commit da9688d

Please sign in to comment.