18 lines
1006 B
Bash
18 lines
1006 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# This is a device build with its JS bundle embedded, never a simulator archive.
|
|
workspace=$(find ios -maxdepth 1 -name '*.xcworkspace' -print -quit)
|
|
if [[ -z "$workspace" ]]; then echo 'iOS workspace missing after prebuild' >&2; exit 1; fi
|
|
scheme=$(basename "$workspace" .xcworkspace)
|
|
xcodebuild -workspace "$workspace" -scheme "$scheme" -configuration Release \
|
|
-sdk iphoneos -destination 'generic/platform=iOS' -derivedDataPath ios/unsigned-build \
|
|
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY='' build
|
|
app_path=$(find ios/unsigned-build/Build/Products/Release-iphoneos -maxdepth 1 -name '*.app' -print -quit)
|
|
if [[ -z "$app_path" || ! -f "$app_path/main.jsbundle" ]]; then
|
|
echo 'Device app or embedded JS bundle missing' >&2; exit 1
|
|
fi
|
|
mkdir -p artifacts/Payload
|
|
cp -R "$app_path" artifacts/Payload/
|
|
(cd artifacts && zip -qry Veyra-unsigned.ipa Payload)
|
|
shasum -a 256 artifacts/Veyra-unsigned.ipa > artifacts/Veyra-unsigned.ipa.sha256
|