Skip to content

Commit afbe591

Browse files
committed
Adjust ios build script to support regtest
1 parent 4ec4ba6 commit afbe591

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

scripts/build-ios-sim.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,31 @@
1313
#
1414
# Usage:
1515
# ./scripts/build-ios-sim.sh
16+
# BACKEND=regtest ./scripts/build-ios-sim.sh
1617
set -euo pipefail
1718
E2E_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
1819
IOS_ROOT="$(cd "$E2E_ROOT/../bitkit-ios" && pwd)"
1920

20-
# Default to E2E build unless explicitly disabled.
21-
E2E_FLAG="${E2E:-true}"
21+
BACKEND="${BACKEND:-local}"
22+
E2E_BACKEND="local"
23+
E2E_NETWORK="regtest"
2224
XCODE_EXTRA_ARGS=()
23-
if [[ "$E2E_FLAG" == "true" ]]; then
24-
XCODE_EXTRA_ARGS+=(SWIFT_ACTIVE_COMPILATION_CONDITIONS='$(inherited) E2E_BUILD')
25+
26+
if [[ "$BACKEND" == "regtest" ]]; then
27+
E2E_BACKEND="network"
28+
elif [[ "$BACKEND" == "local" ]]; then
29+
E2E_BACKEND="local"
30+
else
31+
echo "ERROR: Unsupported BACKEND value: $BACKEND" >&2
32+
exit 1
2533
fi
2634

35+
XCODE_EXTRA_ARGS+=(
36+
"E2E_BACKEND=$E2E_BACKEND"
37+
"E2E_NETWORK=$E2E_NETWORK"
38+
"SWIFT_ACTIVE_COMPILATION_CONDITIONS=\$(inherited) E2E_BUILD"
39+
)
40+
2741
xcodebuild \
2842
-project "$IOS_ROOT/Bitkit.xcodeproj" \
2943
-scheme Bitkit \

0 commit comments

Comments
 (0)