mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-04 09:58:57 +00:00
* 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
51 lines
1.2 KiB
Bash
Executable File
51 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
if [ "${INTUNE_ENABLED:-}" = "1" ]; then
|
|
echo "🔐 INTUNE_ENABLED detected"
|
|
npm run intune:init
|
|
else
|
|
echo "Getting Cocoapods dependencies"
|
|
npm run pod-install
|
|
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
|
|
|
|
GENERATE_GLYPH_MAP_SCRIPT="scripts/generate-compass-glyph-map.mjs"
|
|
|
|
if [ ! -f "$GENERATE_GLYPH_MAP_SCRIPT" ]; then
|
|
echo "Compass glyph map script not found at: $GENERATE_GLYPH_MAP_SCRIPT"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Generating Compass Icons glyph map"
|
|
node "$GENERATE_GLYPH_MAP_SCRIPT"
|
|
|
|
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
|