Files
mattermost-mobile/scripts/postinstall.sh
Rahim Rahman 1ecba213f0 fix(MM-62375): OutOfMemoryError issue with better catching (#8622)
* fix(MM-62375): OutOfMemoryError issue with gif

* add APNG4Android as npm module instead
2025-02-28 10:16:55 -07:00

48 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
function installPods() {
echo "Getting Cocoapods dependencies"
npm run pod-install
}
function installPodsM1() {
echo "Getting Cocoapods dependencies"
npm run pod-install-m1
}
if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ $(uname -p) == 'arm' ]]; then
installPodsM1
else
installPods
fi
fi
COMPASS_ICONS="node_modules/@mattermost/compass-icons/font/compass-icons.ttf"
if [ -z "$COMPASS_ICONS" ]; then
echo "Compass Icons font not found"
exit 1
else
echo "Configuring Compass Icons font"
cp "$COMPASS_ICONS" "assets/fonts/"
cp "$COMPASS_ICONS" "android/app/src/main/assets/fonts"
fi
ASSETS=$(node scripts/generate-assets.js)
if [ -z "$ASSETS" ]; then
echo "Error Generating app assets"
exit 1
else
echo "Generating app assets"
fi
SOUNDS="assets/sounds"
if [ -z "$SOUNDS" ]; then
echo "Sound assets not found"
exit 1
else
echo "Copying sound assets for bundling"
mkdir -p "android/app/src/main/res/raw/"
cp $SOUNDS/* "android/app/src/main/res/raw/"
fi