Files
sodalive-ios/work/tests/check-event-detail.sh
T

31 lines
1.6 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
TEMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TEMP_DIR"' EXIT
swiftc -swift-version 5 -module-cache-path "$TEMP_DIR/module-cache" \
-D EVENT_MOYA_DOUBLE -emit-module -emit-library -module-name Moya \
"$ROOT/work/tests/EventDetailCheck.swift" -o "$TEMP_DIR/libMoya.dylib"
swiftc -swift-version 5 -module-cache-path "$TEMP_DIR/module-cache" \
-I "$TEMP_DIR" -L "$TEMP_DIR" -lMoya \
-D EVENT_COMBINE_MOYA_DOUBLE -emit-module -emit-library -module-name CombineMoya \
"$ROOT/work/tests/EventDetailCheck.swift" -o "$TEMP_DIR/libCombineMoya.dylib"
swiftc -swift-version 5 -module-cache-path "$TEMP_DIR/module-cache" \
-I "$TEMP_DIR" -L "$TEMP_DIR" -lMoya -lCombineMoya \
-Xlinker -rpath -Xlinker "$TEMP_DIR" \
"$ROOT/SodaLive/Sources/Settings/Event/EventApi.swift" \
"$ROOT/SodaLive/Sources/Settings/Event/EventRepository.swift" \
"$ROOT/SodaLive/Sources/Settings/Event/Event.swift" \
"$ROOT/SodaLive/Sources/V2/Settings/Event/EventDetailViewModel.swift" \
"$ROOT/SodaLive/Sources/Common/ApiResponse.swift" \
"$ROOT/SodaLive/Sources/Common/ApiResponseWithoutData.swift" \
"$ROOT/SodaLive/Sources/Extensions/UserDefaultsExtension.swift" \
"$ROOT/work/tests/EventDetailCheck.swift" \
-o "$TEMP_DIR/check-event-detail"
"$TEMP_DIR/check-event-detail"
swiftc -swift-version 5 -parse-as-library -module-cache-path "$TEMP_DIR/module-cache" \
-D EVENT_ROUTE_CHECK "$ROOT/work/tests/EventDetailCheck.swift" -o "$TEMP_DIR/check-event-routes"
"$TEMP_DIR/check-event-routes" "$ROOT"