- Show stable group health in a fixed 2x2 metric grid - Add link-chain state to fleet cards and parse hardware/control/SIM/cellular - Replace the wrapped icon with a full-bleed app icon - Bump the IPA build number
50 lines
1.6 KiB
Bash
Executable File
50 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
IOS_ROOT="$ROOT/apps/ios"
|
|
BUILD_ROOT="$ROOT/build/ipa"
|
|
APP_NAME="MultiSimAdmin"
|
|
DERIVED_ROOT="${MULTI_SIMADMIN_IOS_DERIVED:-$IOS_ROOT/.build/ios-derived}"
|
|
|
|
cd "$IOS_ROOT"
|
|
xcodebuild -scheme "$APP_NAME" \
|
|
-destination 'generic/platform=iOS' \
|
|
-configuration Release \
|
|
-derivedDataPath "$DERIVED_ROOT" \
|
|
build
|
|
|
|
mkdir -p "$BUILD_ROOT/Payload/$APP_NAME.app"
|
|
find "$BUILD_ROOT" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
|
|
mkdir -p "$BUILD_ROOT/Payload/$APP_NAME.app"
|
|
cp "$DERIVED_ROOT/Build/Products/Release-iphoneos/$APP_NAME" \
|
|
"$BUILD_ROOT/Payload/$APP_NAME.app/$APP_NAME"
|
|
cp "Sources/$APP_NAME/Resources/Info.plist" \
|
|
"$BUILD_ROOT/Payload/$APP_NAME.app/Info.plist"
|
|
xcrun actool \
|
|
--compile "$BUILD_ROOT/Payload/$APP_NAME.app" \
|
|
--platform iphoneos \
|
|
--minimum-deployment-target 16.0 \
|
|
--app-icon AppIcon \
|
|
--output-format human-readable-text \
|
|
--output-partial-info-plist "$BUILD_ROOT/AssetCatalog-Info.plist" \
|
|
"$IOS_ROOT/Sources/$APP_NAME/Resources/Assets.xcassets"
|
|
|
|
if [[ ! -f "$BUILD_ROOT/Payload/$APP_NAME.app/Assets.car" ]]; then
|
|
echo 'Assets.car missing: application icon was not compiled' >&2
|
|
exit 1
|
|
fi
|
|
|
|
/usr/libexec/PlistBuddy -c "Merge '$BUILD_ROOT/AssetCatalog-Info.plist'" \
|
|
"$BUILD_ROOT/Payload/$APP_NAME.app/Info.plist"
|
|
|
|
plutil -lint "$BUILD_ROOT/Payload/$APP_NAME.app/Info.plist"
|
|
cd "$BUILD_ROOT"
|
|
zip -qry "$APP_NAME.ipa" Payload
|
|
shasum -a 256 "$APP_NAME.ipa" > "$APP_NAME.ipa.sha256"
|
|
|
|
printf 'IPA: %s/%s.ipa\n' "$BUILD_ROOT" "$APP_NAME"
|
|
printf 'Size: %s bytes\n' "$(stat -f %z "$APP_NAME.ipa")"
|
|
printf 'SHA-256: '
|
|
cat "$APP_NAME.ipa.sha256"
|