mattermost-mobile-upstream/scripts/preinstall.sh
Jesse Hallam de95996bc7
Simplify iOS dependency install: remove "-m1" script variants (#9816)
* Remove pod-install-m1 npm script

Apple Silicon runs 'pod install' natively (as CI's arm64 runners already
do), so the separate pod-install-m1 script and its arch -x86_64 (Rosetta)
workaround are no longer needed. Point postinstall.sh, build.sh, and
intune-init.sh at the single pod-install script.

* Remove ios-gems-m1 npm script

bundle install runs natively on Apple Silicon, so the separate
ios-gems-m1 script and its arch -arm64 are unnecessary. With pods and gems
both unified, build.sh's installGemsAndPodsM1 became identical to
installGemsAndPods, so collapse them and drop the per-arch selector.

* Propagate pod-install/intune:init failures in postinstall
2026-06-09 18:59:07 -03:00

17 lines
408 B
Bash
Executable File

#!/usr/bin/env bash
function cocoapods() {
echo "Installing Cocoapods"
npm run ios-gems &> /dev/null || exit 1
}
if [[ "$OSTYPE" == "darwin"* ]]; then
if !(gem list bundler -i --version 2.5.11) > /dev/null 2>&1; then
echo "Installing Bundler"
gem install bundler --version 2.5.11 || exit 1
fi
if !(gem list cocoapods -i --version 1.16.1) > /dev/null 2>&1; then
cocoapods
fi
fi