Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions scripts/build-for-testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@ fi

flags+=( -scheme "$SCHEME" )

# Sanitize SCHEME to be used in file paths
SCHEME_PATH=$(echo "${SCHEME}" | tr -d '()' | tr ' ' '_')
Comment thread
ncooke3 marked this conversation as resolved.

if [[ "$SCHEME" != "$SCHEME_PATH" ]]; then
echo "Sanitized scheme '$SCHEME' to '$SCHEME_PATH' for file paths."
fi

# Set derivedDataPath
DERIVEDDATAPATH="build-for-testing/${SCHEME}"
DERIVEDDATAPATH="build-for-testing/${SCHEME_PATH}"
flags+=( -destination "generic/platform=iOS" -derivedDataPath "$DERIVEDDATAPATH")

# Add extra flags
Expand Down Expand Up @@ -125,6 +132,6 @@ xcb "${flags[@]}"
echo "$message"

# Zip build-for-testing into MyTests.zip
cd "build-for-testing/${SCHEME}/Build/Products"
cd "build-for-testing/${SCHEME_PATH}/Build/Products"
zip -r MyTests.zip Debug-iphoneos ./*.xctestrun
echo "build-for-testing/${SCHEME}/Build/Products zipped into MyTests.zip"
echo "build-for-testing/${SCHEME_PATH}/Build/Products zipped into MyTests.zip"
Loading